Image Charts (Deprecated)

Radar Charts

   

This document describes how to create radar charts using the Chart API.

Table of Contents

Chart-Specific Features

  1. Overview
  2. Chart Types (cht)
  3. Series Colors (chco)

Standard Features

  1. Chart Title (chtt, chts)
  2. Chart Legend Text and Style (chdl, chdlp, chdls)
  3. Chart Margins (chma)
  4. Axis Styles and Labels
    1. Visible Axes (chxt)
    2. Axis Range (chxr)
    3. Custom Axis Labels (chxl)
    4. Axis Label Positions (chxp)
    5. Axis Label Styles (chxs)
    6. Axis Tick Marks (chxtc)
  5. Background Fills (chf)
    1. Solid Fills (chf)
    2. Gradient Fills (chf)
    3. Striped Fills (chf)
  6. Grid Lines (chg)
  7. Dynamic Markers (chem)
  8. Line Styles (chls)
  9. Line Fills (chm)
  10. Shape Markers (chm)
  11. Text and Data Value Markers (chm)
  12. Range Markers (chm=r|R)
  13. Line Markers (chm=D)
  14. Data functions (chfd)

Overview

In a radar chart, data points are drawn evenly spaced, clockwise around the chart. The value of the point is represented as the distance from the center of the chart, where the center represents the minimum value, and the chart edge is the maximum value. Each series is drawn as one complete circuit of the chart. The chart connects these points with straight or curved lines, as you specify. So, a radar chart is essentially a line chart wrapped into a circle, where the y-axis goes from the center of the chart to the perimeter, and the x-axis is the perimeter of the chart, starting and ending at the 12:00 line.

A chart is divided evenly into equal segments; the number of segments is the greater of these two values:

  • the number of labels + 1 (as specified by chxl, if present), or
  • the number of data values.

So, for instance, if you have a chart with eight data points and no labels, the data points will be spaced 45 degrees apart (360 / 8).

If you have multiple series, the series with the most point is counted. The minimum number of segments is four; if you have fewer than four labels or data points, the chart will default to four segments. You need n+1 data points to make a complete circuit of the chart, where n is the number of segments. More data points will increase the granularity of the chart. Your data will never go around the chart more than once.

.A radar chart can support multiple series. Each series is a line on the chart.

Description Example

 

For a chart of type r, points are connected with straight lines.

This example shows a simple radar chart, with a single data series. The values are gradually increasing, which gives a snail shell appearance.

Radar chart
cht=r
chd=t:10,20,30,40,50,60,70,80,90

When x-axis labels are included in a radar chart, the spacing of the data points around the chart is determined by the number of labels, or the number of data points, whichever is larger. In both these charts, the number of data points is the same (five), but the first has fewer labels, and the second has more labels. The first chart assigns data locations according to number of data points, and the second according to the number of labels. Notice that the second chart has six segments, which gives seven points to make a complete circle.


chd=t:10,20,30,40,50
chxl=0:|1|2|3|4

Chart with 5 data points, 4 labels.
Data at 360/5=72 degree intervals



chd=t:10,20,30,40,50
chxl=0:|1|2|3|4|5|6

Chart with 6 labels, 5 data points.
Data at 360/6=60 degree intervals.

You can add further information and clarity to a radar chart by adding colors, line styles, and axis labels.

This example is a more complex radar chart with two data series. The color of each data series is specified with chco, as described in Series colors.

Line styles are specified with chls, as described in Line styles.

Axis labels are specified with chxt, chxl, and chxr, as described in Axis styles and labels. For radar charts, the x-axis is drawn in a circle around the perimeter of the chart, and the y- and r-axes go from the center of the chart to the top. The t-axis is ignored. This chart includes x-axis labels that might indicate values at various compass locations (for example, wind velocity).

 

Radar chart
chco=FF0000,FF9900
chls=2.0,4.0,0.0|2.0,4.0,0.0
chxt=x
chxl=0:|0|45|90|135|180|225|270|315
chxr=0,0.0,360.0

In charts of type rs, points are connected with curved lines.

This example uses the same parameters as the previous example, but has a line fill specified for both data series.

This example includes grid lines.

 

Radar chart with line fills
chg=25.0,25.0,4.0,4.0
chm=
B,FF000080,0,1.0,5.0|
B,FF990080,1,1.0,5.0

In radar charts, horizontal line markers are bent into circles, and vertical line markers radiate outward from the center, as shown here.

  • chm=h,0000FF,... - The dark blue circle. Note how horizontal line shape markers produce a circle on a radar chart.
  • chm=V,00FF0080,... - The green line at 6:00.

See Shape markers for more information about available shapes.

Radar chart
chm=
h,0000FF,0,1.0,4.0
V,00FF00,0,4.0,5.0

Back to top

Chart Types (cht)

There are two types of radar charts: straight line charts (cht=r) curved line charts (cht=rs).

Parameter Description Example
r

 

For a chart of type r, points are connected with straight lines.

Radar chart
cht=r
chd=t:10,20,30,40,50,60

rs Chart type rs connects points with curved lines. Radar chart
cht=rs
chd=t:10,20,30,40,50,60,70,80,90

Back to top

Series Colors chco

Optionally specify the colors of the lines using the chco parameter.

Syntax

chco=<color_1>,...,<color_n>
<color>
Specify one or more line colors in RRGGBB hexadecimal format separated by commas. If there are more lines than colors, the extra lines will cycle through the color list from the beginning.

Standard Features

The rest of the features on this page are standard chart features.

Chart Feature List

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.