- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Overlay Line Chart - how to display datapoint labels on chart?
Created:
Apr 18, 2017 12:15 PM
| Last Modified: Apr 18, 2017 9:16 AM
(8518 views)
| Posted in reply to message from djhanson 04-11-2017
Using persistent tooltips, you can do this kind of thing:
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'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
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.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Overlay Line Chart - how to display datapoint labels on chart?
Created:
Apr 18, 2017 12:15 PM
| Last Modified: Apr 18, 2017 9:16 AM
(8519 views)
| Posted in reply to message from djhanson 04-11-2017
Using persistent tooltips, you can do this kind of thing:
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'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
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.