CHART

You are here:
Function name CHART
Type Graphical
Arguments – xvalues
– yvalues
– library
– type
– options
Syntax =CHART(xvalues, yvalues, library, type, options)
Description Shows a chart based on the chosen library.

The arguments description:

xvalues – a sequence of numbers (1, 2, 3, 4, …) or cell addresses (A1, A2, A3, …) or a range (A1:A20) specifying labels on x-axis,

yvalues – a sequence of numbers (1, 2, 3, 4, …) or cell addresses (A1, A2, A3, …) or a range (A1:A20) specifying values on y-axis,

library – “rgraph” (with quotes, single or double) specifying library,

type – “line”, “bar”, “pie”, … (with quotes) specifying type of the chart,

options – library specific options, like thickness of the line or bar, shadow etc. Currently the full specification can be found on the library’s website. Options are not mandatory and the field can be left blank. If the value of option is to be TRUE or FALSE, it needs to be given with quotes (“TRUE” or “true”). The same applies to the colours (“blue”).

Library

  • RGraph charts that can be used:

Line, Bar, Horizontal Rar, Combined Line & Bar, Pie, Rose, Radar, Bipolar, Fuel, Funnel, Gantt, Gauge, Horizontal Progress, Vertical Progress, Odometer, Meter, Radial Scatter, Scatter, Semicircular Progress, Thermometer, Waterfall.

The option descriptions can be found at RGraph reference page.

Examples:

=CHART(['Olaf','Katy','Frank','Mary','Barbara','Lee','John'],[84,76,79,84,86,52,53],"rgraph","line",[{width:500,height:300}])
=CHART([1,2,3,4,5,6,7],{bar:[[84,76,79,84,86,52,53],[34,96,39,54,76,62,23]],line:[[84,76,79,84,86,52,53],[34,96,39,54,76,62,23]]},"rgraph","combined_line_bar",[{width:500,height:300,bar:{width:500,height:300},line:{fillColor:"red"}}])
  • Sparkline charts that can be used:

Line, Bar, Tristate, Discrete, Bullet, Pie, Box.

The option descriptions can be found at jQuery Sparklines page.

Examples:

=CHART([1,2,3,4,5,6,7,8,9,10],[12,6,21,45,32,11,35,65,43,26],"sparklines","line",[{height:60,width:300,lineWidth:3,fillColor:"blue"}])
=CHART([],[1,1,2,5,7,9,3,1],"sparklines","pie",[{width:65,height:65,lineWidth:2,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"]}])