Bar chart data is stored in a text file located at a specific URL.
This allows the data to be modified and updated dynamically at
specific intervals. Data may be generated in a text editor, via a CGI
script, or from a spreadsheet like Microsoft Excel, using the "save
as text" option.
In the data file, each data series is placed on a separate line. Each
series (line of data) should contain the same number of values,
separated by spaces or tabs. A maximum of six series are allowed.
When there is more than one line of data in the file, the
corresponding value positions in each line are plotted together in a
cluster, with a different color representing each line. Data can be
presented in two basic types of charts: staggered bars and stacked
bars.
In a staggered bar chart, bars within a cluster are displayed
side-by-side. They may abut, overlap, or be spaced apart, depending
on the setting of the barspace parameter. There are as many
bars within a cluster as there are lines of data, and as many
clusters as there are data values per line.
In a stacked bar chart, bars in a cluster are stacked on top of one
another. There are as many elements per bar as there are lines of
data and as many bars as there are values in each line. The stacks of
bars may abut, overlap, or be spaced apart, again depending on the
barspace. Negative values can't be presented in stacked
charts, but are handled gracefully.
The data in the text file can be in one of two formats: titled or
untitled. The "noNamesInData" value for the option parameter
specifies untitled data. If this value is specified, the data in the
file should take the form:
ser1val1 ser1val2 ser1val3 ...
ser2val1 ser2val2 ser2val3 ...
...
If the "noNamesInData" value is not supplied, it is assumed that
the file contains title data, stored in the form:
title_override val1name val2name val3name ...
series1name ser1val1 ser1val2 ser1val3 ...
series2name ser2val1 ser2val2 ser2val3 ...
...
In this case, the title_override in the file replaces the
title given in the applet tag. Labels for each value are
provided on the same line. Each label corresponds to a value in the
following data series. This is followed by up to six lines, one per
data series, which start with the series name and are followed by the
data values. Any of the names may be omitted by entering a null
string: "" or ''. If a name has embedded spaces it must be in
quotation marks.
Parameter |
Default |
Description |
|---|---|---|
|
barspace |
0 |
Relative amount of space to leave between bars, in percent of space available. A value of 0 displays a chart with no gaps between bars. A value of 25 displays a chart with bars separated by 25 percent of the available space. If you provide a negative value, the bars overlap by the specified percentage. Valid range: -99 to 99. |
|
colors |
red, yellow, green, blue, pink, gray |
The list of colors for each data series bar, separated by commas. These values can be specified using the predefined color names black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, and yellow. Users familiar with hexadecimal numbers can also specify colors as hex values representing a Red-Green-Blue mix. Hex values take the form RRGGBB, with 000000 for black, FFFFFF for white, and FF0000 for red. If not enough colors are specified to match the number of data series, default values are used. |
|
bgColor |
lightGray |
The background color for the chart. The value provided may be specified as described in the colors parameter. A value of 'none' specifies no background fill. |
|
borderColor |
black |
The border color for the chart. The value provided may be specified as described in the colors parameter. A value of 'none' specifies no border outline for the chart. |
|
inset |
4 |
The number of pixels to inset the chart drawing area from the boundary of the chart. It's recommended that you allow at least one pixel of space for the chart border for standard chart styles, and four pixels for embossUp and embossDown styles (specified with the options parameter). |
|
options |
-- |
Charting options specified in a list separated by commas. The values provided may be any of the following:
|
|
outlineColor |
black |
The color to use for bar outlines. This value may be specified as described in the colors parameter. A value of 'none' specifies no bar outlines. |
|
reloadInterval |
0 |
Defines how often to reload the data file specified by the URL parameter. When the value is greater than 0, Charts updates its data from the file every reloadInterval seconds. |
|
shadowColor |
-- |
The drop shadow color. This value is specified as described in the colors parameter. The default setting provides no drop shadow. |
|
textColor |
black |
The color to use for text. The value is specified as described in the colors parameter. |
|
title |
null |
Title for the chart. This value is specified as a string, enclosed in quotes. If this parameter is undefined and no title is provided in the data file, the chart will be untitled. |
|
type |
vbar |
Chart type. The value may be one of the following:
|
|
url |
required |
The URL of the data file to be charted. |