|
Table of Contents
OverviewThe horizontally-stacked bar chart may be used to draw both positive and negative values. The chart type code for the horizontally-stacked bar chart is Getting Started
Colors (
|
Description | Image |
---|---|
One color per series, with comma-delimited colors. |
chd=s:SENGELHA,bobcasey
|
chcor
)This parameter allows you to control the colors of the bars by specifying the colors that apply to specific numeric ranges.
A number that falls outside of any numeric ranges specified by this parameter will be rendered in a gray color.
chcor=<opt_lower_1>,<opt_upper_1>,<color_1>
|...|
<opt_lower_n>,<opt_upper_n>,<color_n>
Description | Image |
---|---|
Render values less than 0 with red (FF0000 ) and values greater than 0 with green (008000 ). |
chcor=,0,FF0000|0,,008000
|
chf
)The background color of the chart can be controlled using the chart fill option.
chf=<fill_type>,s,<color>
The part of the chart being filled. Specify one of the following values:
bg
- Background fillc
- Chart area fill - the part of the chart that contains the dataDescription | Image |
---|---|
Fill the chart background with pale grey (EFEFEF ). |
chf=bg,s,EFEFEF
|
Fill only the charting area with pale grey (EFEFEF ). |
chf=c,s,EFEFEF
|
Fill the chart background with semi-transparent yellow (FBF8DDCC ). |
chf=bg,s,FBF8DDCC
|
Fill the charting area with semi-transparent yellow (FBF8DDCC ). Note: We must also
make the chart background fully transparent (00000000 ), otherwise the semi-transparent
area will simply show the default chart background (white). |
chf=bg,s,00000000
|
chft
and chfts
)
The fonts that BPCharts uses to renders labels can be controlled using the
chft
(font name) and chfts
(font size) options.
For raster (e.g. PNG) charts, only fonts which exist on the BPCharts server may be used. For vector (e.g. SVG) charts, the font does not need to exist on the BPCharts server but the client which renders the SVG must have the font installed.
Changing the font name or size only has effect if you have enabled
labels using chxt
. See Axis
Definitions for more detail.
chft=<font_name> chfts=<font_size>
The name of the font to use to render the chart. Defaults to Verdana.
The size of the font to use to render the chart. For raster charts (e.g. PNG) this is in pixels; for vector charts (e.g. SVG) this is in points.
For raster charts, defaults to 11 pixels tall. For vector charts, defaults to 8 points tall.
Description | Image |
---|---|
Draw the axis labels in 14-pixel-tall Times New Roman. |
chft=Times New Roman
|
chxt
, chxr
, chxl
, chxlg
)
You can control chart axes using the chxt
, chxr
,
chxl
, and chxlg
options.
The chxt
option controls which axes you wish to display.
The chxr
option controls a range for one or more axes. It
can only be used for the y and r axes.
The chxl
option allows you to manually specify the labels
for an axis.
The chxlg
option allows you to manually specify the gap
between the labels for an axis and the axis itself.
chxr
is not supported for the y-axis. If you enable the x-axis, you must
specify labels by using chxl
.
chxt=<axis_1>,...,<axis_n> chxr=<axis_1>,<range_start_1>,<range_end_1>,<opt_major_interval_1>,<opt_minor_interval_1> |...| <axis_n>,<range_start_n>,<range_end_n>,<opt_major_interval_n>,<opt_minor_interval_n> chxl=<axis_index>:<label_1>,...,<label_n> chxlg=<axis_1>:<gap_1> |...| <axis_n>:<gap_n>
Display the axis, using the following axis codes:
x
- X-Axis on the bottom of the charty
- Y-Axis on the left of the chartr
- Y-Axis on the right of the chartDescription | Image |
---|---|
Display a x-axis on the bottom of the chart with an automatically determined range. |
chxt=x
|
Display a x-axis on the bottom of the chart with a range from 0 to 100 and a major interval of 20. |
chxt=x
|
Create a 20-pixel gap between the labels of the x-axis on the bottom of the chart and the chart itself. |
chxt=x
|
chxs
)
You can control the style of individual axis labels by using the chxs
option.
chxs=<axis_index>,<opt_label_color>,<opt_font_size> |...| <axis_index>,<opt_label_color>,<opt_font_size>
chxt
parameter.Description | Image |
---|---|
Draw the x-axis labels in 14 pixel tall red (FF0000 ) |
chxt=x
|
chgx
)
You can control the chart grid lines using the chgx
option.
chgx
stands for axis-aligned grid lines. The horizontal grid
lines are drawn aligned with the axis major interval for the y/r-axis, as
specified by the chxr
option. For vertical grid-lines, grid
lines are drawn for every point with a non-empty label on the x-axis, as
specified by the chxl
option. Use a space or non-empty
string to denote the place where you want to denote a grid line to be drawn
and an empty string to denote no grid line.
chgx=<axis>,<opt_dash_length>,<opt_space_length>,<opt_color>,<opt_thickness> |...| <axis>,<opt_dash_length>,<opt_space_length>,<opt_color>,<opt_thickness>
The axis with whose major interval you want the grid lines synchronized.
x
- Vertical grid lines aligned with the x-axis major intervaly
- Horizontal grid lines aligned with the y-axis major interval.000000
)Description | Image |
---|---|
Turn off all grid lines. |
chgx=
|
Draw a chart with solid horizontal grid lines only. |
chgx=y
|
Draw a chart with solid gray (CCCCCC ) horizontal axis lines and
dotted gray (CCCCCC ) vertical axis lines. |
chgx=x,1,3,CCCCCC|
|
Draw a chart with 3-pixel-thick dashed red (FF0000 )
vertical grid lines. |
chgx=x,4,2,FF0000,3
|