This document explains how to specify style options and marker types for your chart.
For bar charts, specify bar thickness and spacing with
chbh=
<bar width>,
<space between bars>,
<space between groups>
<bar width> should be specified in pixels. Use
a instead of a pixel value to automatically
resize bars, as described below. Use r instead of a pixel value to
resize bars by using relative spacing, as described below.
<space between bars> and <space between
groups> should be specified in pixels. These parameters are optional.
If you are using r to resize bars by using relative spacing, these
values should be percentage values expressed as floating point numbers. Use
0 to represent 0%, use 1.0 to represent 100%, and so on.
| Parameter | Description | Example |
|---|---|---|
|
Bar chart size is determined by the The default space between bars in a bar chart is 4 pixels. The default space between groups in a bar chart is 8 pixels. If you choose a value for |
|
|
To automatically resize bars to fit the space available, specify
|
|
|
|
If you prefer to specify the spaces between bars and groups relative to the width of the bars, you can automatically resize bars using
|
|
For bar charts, specify a zero line with
chp=
<value between 0 and 1 for data set 1>,
<value between
0 and 1 for data set n>
Provide just one value to apply the same zero line to all data sets.
| Parameter | Description | Example |
|---|---|---|
|
|
In this example, a
Data points that are placed on the zero line are not drawn. |
|
|
|
Alternatively, you can set a zero line by using the data scaling parameter
( The example has a data set ranging from -60 to 120. The scale is set to -80 to 140, to leave space above and below the bars. See Text encoding with data scaling for more information. |
chd=t:30,-60,50,120,80 |
Specify a chart margin with
chma=
<left margin>,<right margin>,<top margin>,<bottom
margin>|<legend width>,<legend height>
All margin values specified are the minimum margins around the plot area, in pixels.
The <legend width> and <legend
height> parameters are optional.
| Parameter | Description | Example |
|---|---|---|
|
|
In this example, the chart has a minimum margin of 30 pixels on each side. Because the chart legend is more than 30 pixels wide, the margin on the right side is set to the width of the chart legend, and is different from the other margins. Axis labels are outside the plot area, and are therefore drawn within the margin space. |
|
|
To add a margin around the legend, set a value for the In this example, the legend is approximately 60 pixels wide.
If you set the the |
|
You can specify line styles for:
Specify line chart styles with
chls=
<data set 1 line thickness>,<length of line segment>,<length of blank segment>|
...
<data set n line thickness>,<length of line segment>,<length of blank segment>
Parameter values are floating point numbers, and multiple line styles are separated
by the pipe character (|). The first line style is applied to the
first data set, the second style to the second data set, and so on.
| Parameter | Description | Example |
|---|---|---|
|
Here the thick dashed line is specified by See Chart colors for information on specifying line colors. |
chls=3,6,3|1,1,0 |
Specify line and bar chart line styles with
chm=D,<color>,<data
set index>,<data point>,<size>,<priority>
where:
<color> is an RRGGBB format hexadecimal number.<data set index> is the index of the data set on which to
draw the line. The data set index is 0 for the first data set, 1
for the second data set, and so on. <data point> is a number that specifies
the data point on which the line will be drawn.
Use one of the following formats:
0 to draw a line using all of the points in the data
set.x:y to draw a line using a range of points from the data
set. x is the first data point in the range, and
y is the last data point in the range.<size> is the width of the line in pixels.<priority> is one of the following:
-1 specifies that the line is drawn before
all other parts of the chart. The line will be hidden if another
chart element is drawn in the same place.0 specifies that the line is drawn after bars or chart lines, but
before other lines. This is the default.1 specifies that the line is drawn after all other parts of
the chart. If more than one line has this value, the first one specified in
the chm parameter will be drawn first, the second one specified
in the chm parameter will be
drawn second, and so on.| Parameter | Description | Example |
|---|---|---|
chm=D |
Here's an example of a data
line on a bar chart. The priority is set to This example uses two data series. The first series is used to draw bars on the chart, and the second series is used as an invisible guide for the data line. See Using multiple data series for more information. |
chm= |
|
Here's an example of a line chart, drawn with |
chm= |
Specify grid lines with
chg=
<x axis step size>,
<y axis step size>,
<length of line segment>,
<length of blank segment>
<x offset>,
<y offset>
The <x axis step size> and
<y axis step size> parameters are required. All other
parameters are optional.
| Parameter | Description | Example |
|---|---|---|
|
This example uses only the |
|
This example uses the |
|
|
To display solid grid lines, specify zero
( |
chg=20,50,1,0 |
|
To draw grid lines which are offset from the
x-axis, specify a value for the
To draw grid lines which are offset
from the y-axis, specify a value for the
|
chg=20,50,3,3,10,20 |
For line charts, radar charts, bar charts, and scatter plots, specify shape markers with
chm=
<marker type>,<color>,<data set index>,<data point>,<size>,<priority>|
...
<marker type>,<color>,<data set index>,<data point>,<size>,<priority>
Where:
<marker type> is one of the following characters:
a creates an arrow.c creates a cross.d creates a diamond.o creates a circle.s creates a square.v creates a vertical line from the x-axis to
the data point.V creates a vertical line across the chart.h creates a horizontal line across the chart.x creates an x shape.<color> is an RRGGBB format hexadecimal number.<data set index> is the index of the data set on which to
draw the marker. The data set index is 0 for the first data set, 1
for the second data set, and so on. <data point> is a floating point value that specifies
the data point on which the marker will be drawn.
Use one of the following formats:
0 to draw a marker on the first data point,
1 to draw a marker on the second data point, and so on. Use a
decimal number to interpolate a marker between two data points.-1 to draw a marker on each data point.-n to draw a marker on every n-th data point.x:y:n to draw a marker on every n-th data point in a
range, where x is the first data point in the range, and
y is the last data point in the range.x:y to draw a marker at a specific point. Add the at
character (@) before the marker type to use this option.
Specify the coordinates as floating point values, where 0:0
is the bottom left corner of the chart, 0.5:0.5 is the center of
the chart, and 1:1 is the top right corner of the chart. For
example, to add a red, 15-pixel diamond to the center of a chart, use
@d,FF0000,0,0.5:0.5,15.n to draw a horizontal line. Specify a floating point number
for the location of the line, where 0.0 is the bottom of the
chart, and 1.0 is the top of the chart.<size> is the size of the marker in pixels.<priority> is one of the following:
-1 specifies that the marker is drawn before
all other parts of the chart. The marker will be hidden if another
chart element is drawn in the same place.0 specifies that the marker is after bars or lines, but
before other markers. This is the default.1 specifies that the marker is drawn after all other parts of
the chart. If more than one marker has this value, the first one specified in
the chm parameter will be drawn first, the second one specified in the chm parameter will be
drawn second, and so on.Multiple markers are separated using the pipe character (|).
| Parameter | Description | Example |
|---|---|---|
|
Here's an example of the full set of shape and line markers. |
|
Here's an example of marker type See the Scatter plot section for details on setting the size of each data point. |
|
|
Here's an example using diamonds for one data set, and circles for the other data set. If two or more markers occupy the same point, the markers are drawn in the
order in which they appear in the |
chm= |
|
|
Here's a bar chart with text as a marker. |
chm= |
|
|
Here's a line chart with a marker on every second data point. |
chm= |
For line charts, radar charts, bar charts, and scatter plots specify horizontal and vertical range markers with
chm=
<r or R>,<color>,<any value>,<start point>,<end point>|
...
<r or R>,<color>,<any value>,<start point>,<end point>
Where:
<r or R> is r for a horizontal range and R for a vertical range.<color> is an RRGGBB format hexadecimal number.<any value> is ignored.<start point> is the position at which the range
starts.
<start point>
value is a position on the
y-axis, where 0.00 is the bottom of the chart, and
1.00 is the top of the chart.<start point> value
is a position on the
x-axis, where 0.00 is the left of the chart, and
1.00 is the right of the chart.<end point> is the position at which the range
ends.
<end point>
value is a position on the
y-axis, where 0.00 is the bottom of the chart, and
1.00 is the top of the chart.<end point> value
is a position on the
x-axis, where 0.00 is the left of the chart, and
1.00 is the right of the chart.Multiple range markers are separated using the pipe character (|).
| Parameter | Description | Example |
|---|---|---|
|
Range markers can be a thin line or a band of color.
In this example, the first marker is a pale blue band ( |
|
chm=R |
This example shows the vertical range markers.
The first marker is a red line ( |
R,FF0000,0,0.1,0.11| |
chm= |
The last marker specified takes precedence over previous markers. Here, the horizontal markers are specified last. This means that they are drawn on top of the vertical markers. |
|
chm=r |
Here's an example of a line chart that uses range markers to draw faint horizontal lines across the chart. |
|
For line charts, and vertical bar charts, specify financial markers with:
chm=
F,<color>,<data set index>,<data point>,<size>,<priority>
Where:
<color> is an RRGGBB format hexadecimal number. This parameter is
optional.<data set index> is the index of the data set on which to
draw the marker. The data set index is 0 for the first data set, 1
for the second data set, and so on.<data point> is a number that specifies
the data point on which the marker will be drawn.
Use one of the following formats:
0 to draw a marker on the first data point,
1 to draw a
marker on the second data point, and so on. Use a decimal number to
interpolate a marker between two data points.-1 to draw a marker on each data point.-n to draw a marker on every n-th data point.x:y:n to draw a marker on every n-th data point in a
range, where x is the first data point in the range, and
y is the last data point in the range.<size> is the width of the rectangle in pixels.<priority> is one of the following:
-1 specifies that the marker is drawn before
all other parts of the chart. The marker will be hidden if another
chart element is drawn in the same place.0 specifies that the marker is drawn after bars or chart lines, but
before other markers. This is the default.1 specifies that the marker is drawn after all other parts of
the chart. If more than one marker has this value, the first one specified in
the chm parameter will be drawn first, the second one specified in the chm parameter will be
drawn second, and so on.To draw financial markers, your chart
must include at least four data sets. The bottom of the vertical line is
drawn on the data set provided in the <data set index>.
The bottom of the rectangle is drawn on the next data set. The top of the
rectangle is drawn on the data set which has an index of <data set
index> + 2, and the top of the vertical line is drawn on the data set
which has an index of <data set index> + 3.
Multiple markers are separated using the pipe character (|).
| Parameter | Description | Example |
|---|---|---|
|
Here's an example of financial markers on a line chart with four data sets. The rectangle is filled in blue when the value of the point in the third data set is higher than the value of the same point in the second data set. |
|
Here's an example of the same chart, using the default
colors. Omit the Although five data sets are provided, only one is displayed. See Using multiple data series for more details. |
|