Charts (Sparklines)

jQuery Sparklines is a JavaScript library that can make a couple of types of sparkline charts on a website. We use this library as one of our basic charting libraries (alongside RGraph).

CHART / CHART_sparklines function

To show an RGraph chart in your spreadsheet you can use a function CHART or CHART_SPARKLINES. The syntax for both functions is similar, except that CHART_SPARKLINES doesn’t require argument library:

=CHART(xvalues, yvalues, library, type, options)

=CHART_SPARKLINES(xvalues, yvalues, type, options)

The arguments meaning:

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 set to be TRUE or FALSE, it needs to be given with quotes (“TRUE” or “true”). The same applies to the colours (“blue”).

A couple of examples:

read more >>

Charts (RGraph)

RGraph is a JavaScript library that can make a wide variety of chart types and graphs on a website. We use this library as one of our basic charting libraries (alongside jQuery Sparklines). Currently only canvas based charts can be created.

CHART / CHART_RGRAPH function

To show an RGraph chart in your spreadsheet you can use a function CHART or CHART_RGRAPH. The syntax for both functions is similar, except that CHART_RGRAPH doesn’t require argument library:

=CHART(xvalues, yvalues, library, type, options)

=CHART_RGRAPH(xvalues, yvalues, type, options)

The arguments meaning:

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 set to be TRUE or FALSE, it needs to be given with quotes (“TRUE” or “true”). The same applies to the colours (“blue”).

A couple of examples:

=CHART(['Olaf','Katy','Frank','Mary','Barbara','Lee','John'],[84,76,79,84,86,52,53],"rgraph",
read more >>

Charts

TotalSheets uses 3-rd party JavaScript libraries to show any graphical results. All visualizations are carried our for each cell individually. As for the charting libraries, currently there are two supported libraries:

RGraph

jQuery Sparklines

To add a chart to a cell, CHART function can be used. The full syntax is as follows:

=CHART(xvalues, yvalues, library, type, options)

The arguments are described below:

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” or “sparklines” (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 set to be TRUE or FALSE, it needs to be given with quotes (“TRUE” or “true”). The same applies to the colours (“blue”).

A couple of examples:

=CHART([1,2,3,4,5,6,7,8,9,10],[12,6,21,45,32,11,35,65,43,26],"sparklines",
read more >>