cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
djhanson
Level V

Overlay Line Chart - how to display datapoint labels on chart?

Is there a way (maybe ingenious) to display datapoint values on a Graph Builder overlay line chart?

Example, I do know if I set say dt1<<set label columns("N Things"); I can then get these datapoint labels for "N Things" column to show up on the chart as numbers, but only in a point chart.  I was trying to do this but for a line chart now but so far to no avail.  Thoughts?  DJ

2 ACCEPTED SOLUTIONS

Accepted Solutions
ian_jmp
Level X

Re: Overlay Line Chart - how to display datapoint labels on chart?

Using persistent tooltips, you can do this kind of thing:

 

Screen Shot 2017-04-18 at 17.13.25.png

 

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Graph Builder(
			Size( 528, 452 ),
			Show Control Panel( 0 ),
			Variables(
				X( Transform Column( "Row", Formula( Row() ) ) ),
				Y( :height ),
				Overlay( :sex )
			),
			Elements( Line( X, Y, Legend( 11 ) ) ),
			SendToReport(
				Dispatch(
					{},
					"Graph Builder",
					FrameBox,
					{Add Pin Annotation(
						Seg( Line Seg( 2 ) ),
						Index( 3 ),
						Index Row( 11 ),
						UniqueID( 84806150 ),
						FoundPt( {187, 183} ),
						Origin( {12.1797520661157, 64.8846153846154} ),
						Offset( {-9, -63} ),
						Tag Line,
						Font( "Helvetica Neue", 11, "Plain" )
					), Add Pin Annotation(
						Seg( Line Seg( 1 ) ),
						Index( 13 ),
						Index Row( 27 ),
						UniqueID( 84567066 ),
						FoundPt( {355, 230} ),
						Origin( {27.7995867768595, 62.1730769230769} ),
						Offset( {-34, 86} ),
						Tag Line,
						Font( "Helvetica Neue", 11, "Plain" )
					)}
				)
			)
		);

 

I imagine one could do this through JSL, rather than 'by hand'.

View solution in original post

Re: Overlay Line Chart - how to display datapoint labels on chart?

You can cheat by creating a points chart with the same summary statistic as your desired line chart. Then hold down shift and click the line chart.

To hide the markers, set them to be a space character (Alt 255). To do this select all the rows in the data table. From the rows hotspot select Markers - Other... Click in the text box that appears then hold down the Alt key and type 255. Hit OK.

Now any rows you label will appear on the line in the correct place.

View solution in original post

2 REPLIES 2
ian_jmp
Level X

Re: Overlay Line Chart - how to display datapoint labels on chart?

Using persistent tooltips, you can do this kind of thing:

 

Screen Shot 2017-04-18 at 17.13.25.png

 

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Graph Builder(
			Size( 528, 452 ),
			Show Control Panel( 0 ),
			Variables(
				X( Transform Column( "Row", Formula( Row() ) ) ),
				Y( :height ),
				Overlay( :sex )
			),
			Elements( Line( X, Y, Legend( 11 ) ) ),
			SendToReport(
				Dispatch(
					{},
					"Graph Builder",
					FrameBox,
					{Add Pin Annotation(
						Seg( Line Seg( 2 ) ),
						Index( 3 ),
						Index Row( 11 ),
						UniqueID( 84806150 ),
						FoundPt( {187, 183} ),
						Origin( {12.1797520661157, 64.8846153846154} ),
						Offset( {-9, -63} ),
						Tag Line,
						Font( "Helvetica Neue", 11, "Plain" )
					), Add Pin Annotation(
						Seg( Line Seg( 1 ) ),
						Index( 13 ),
						Index Row( 27 ),
						UniqueID( 84567066 ),
						FoundPt( {355, 230} ),
						Origin( {27.7995867768595, 62.1730769230769} ),
						Offset( {-34, 86} ),
						Tag Line,
						Font( "Helvetica Neue", 11, "Plain" )
					)}
				)
			)
		);

 

I imagine one could do this through JSL, rather than 'by hand'.

Re: Overlay Line Chart - how to display datapoint labels on chart?

You can cheat by creating a points chart with the same summary statistic as your desired line chart. Then hold down shift and click the line chart.

To hide the markers, set them to be a space character (Alt 255). To do this select all the rows in the data table. From the rows hotspot select Markers - Other... Click in the text box that appears then hold down the Alt key and type 255. Hit OK.

Now any rows you label will appear on the line in the correct place.