This section describes the various types of bar charts that you can create using the Image Chart API.
There are a variety of bar charts that you can create, including vertical, horizontal, grouped, stacked versions of each.
Bar charts are good for side-by-side comparison and spotting trends in a small number of discrete data points. They're a good alternative to line charts when you have only a few data points in a series.
There are three general ways to show multiple series in a bar chart:
- Grouped vertically
- Grouped horizontally
- Stacked vertically
- Stacked horizontally
Google Image Charts supported the
bvo chart type in which vertical bars were stacked in front of one another. This type of chart is not planned to be supported and will automatically falls back to the
You can specify the colors of individual bars, individual series, or multiple series using the chco parameter. If you don't specify a different color for each series, all series will have the same color.
chco=<series_1_color>, ..., <series_n_color> or chco=<series_1_bar_1>|<series_1_bar_2>|...|<series_1_bar_n>,<series_2>,...,<series_n>
<color>: An RRGGBB[AA] format hexadecimal number to apply to a series or individual bar. To apply the color to the whole series, it should be comma-delimited. To apply the color to an individual bar, it should be pipe-delimited. You can mix these two formats. See the table below for examples. Whenever you have fewer color values than data points or series, the colors will cycle through the list again, starting from the first color in that group.
One color per series, with comma-delimited colors.
One color per value, with pipe-delimited colors.
A combination of series colors and individual bar colors.
This example shows a bar chart with two series. The first series all black (000000,) and comma-delimited. The second series is pipe-delimited, and assigns a different color for each point (FF0000|00FF00|0000FF).
This example demonstrates setting different colors for every bar in a multi-series chart.
You can also specify fills to color a series with solid, striped, or gradient colors. Solid fills look the same as using chco, but stripes or gradients create unique effects.