Object Reference : Object View and Procedure Reference : Graph
  
 
datalabel
Control labeling of the data points in graphs.
datelabel sets options that are control the labeling of individual data points in graphs
Syntax
graph_name.datalabel option_list
Options
 
pos(arg)
Label position relative to the data point on the graph. The following positions are available:
L – Left of point (vertically centered)
R – Right of point (vertically centered)
A – Above the point (horizontally centered)
B – Below the point (horizontally centered)
C – Centered on pointed (vertically and horizontally)
Auto – Auto position
point(arg)
Which data points to label, where arg can be:
All – label all data points
First – label only the first visible data point
Last – label only the last visible data point
label(arg)
Specifies the contents of the label, where arg is the custom label string containing text and keywords. The following keywords are replaced with their appropriate values:
@legend – the legend label of the series
@xlabel – the x-axis label of the data point
@ylabel – the y-axis label of the data point
color(arg)
The label text color. Use ‘none’ to set the text color as black. Nothing specified will set the text color to match the line color. If the color option is not specified, the color will be unchanged.
point(arg)
Which data points to label, where arg can be:
All – label all data points
First – label only the first visible data point
Last – label only the last visible data point
Examples
graph1.datalabel point(first) pos(r) label(Start of recession\n(@xlabel(), @ylabel())) color()
will label the first data point of all the series in graph1. The label will be located to the right of the data point. The label will contain the 2 line string where the first line will read “Start of recession” and the second line will contain the comma separated x-value and y-value of the first data point enclosed in parenthesis (example: “(1948Q4,1.1)”). The label color will match the line color.
graph2.datalabel point(all) pos(a) label((@xlabel():@ylabel())) color(none)
will label all of the data points in graph2. The labels will appear above the associated data points in black and will be of the form “(x-value:y-value)” (example: “(1976:900.3)”).
graph3.datalabel point(last) pos(l) label(@legend()-@ylabel()) color()
will label all the series in graph3 but only the last data point for each series. The labels will appear the left of the associated data points and will be of the form “legend label-y-value” (example: “Nevada-35.6”). The label color will match the line color.
Cross-references