A Line chart using the Google Sheets connector
This goes in the documents header:
<script src="../libraries/RGraph.common.core.js" ></script>
<script src="../libraries/RGraph.common.sheets.js" ></script>
<script src="../libraries/RGraph.line.js" ></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="700" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Sheets('1ncvARBgXaDjzuca9i7Jyep6JTv9kms-bbIzyAxbaT0E', 2, function (sheet)
{
new RGraph.Line({
id: 'cvs',
data: sheet.get('B2:M2'),
options: {
linewidth: 25,
tickmarksStyle: null,
xaxisLabels: sheet.get('B1:M1'),
xaxisLabelsOffsety: 10,
colors: ['#f66'],
shadowOffsetx: 2,
shadowOffsety: 2,
colorsStroke: 'rgba(0,0,0,0)',
axes: false,
backgroundGridVlines: false,
backgroundGridBorder: false,
textSize: 18,
marginLeft: 35,
hmargin: 10
}
}).trace2();
});
</script>