A Line chart using the TraceCenter effect
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.line.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="700" height="300">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Line({
id: 'cvs',
data: [8,6,3,5,12,8,5,4,6,12],
options: {
animationTraceCenter: true,
tickmarks: false,
shadow: false,
linewidth: 0,
backgroundGridVlines: false,
backgroundGridBorder: false,
noaxes: true,
spline: true,
filled: true,
colors: ['Gradient(#fcc:red)'],
ymax: 35
}
}).trace(null, function ()
{
new RGraph.Line({
id: 'cvs',
data: [
[8,6,3,5,12,8,5,4,6,12],
[4,8,6,3,5,2,4,8,5,2]
],
options: {
animationTraceCenter: true,
tickmarks: false,
shadow: false,
linewidth: 0,
backgroundGrid: false,
noaxes: true,
colors: ['transparent', 'Gradient(white:green)'],
spline: true,
filled: true,
ymax: 35
}
}).trace(null, function ()
{
new RGraph.Line({
id: 'cvs',
data: [
[8,6,3,5,12,8,5,4,6,12],
[4,8,6,3,5,2,4,8,5,2],
[8,6,3,5,9,4,5,8,4,6]
],
options: {
animationTraceCenter: true,
tickmarks: false,
shadow: false,
linewidth: 0,
backgroundGrid: false,
noaxes: true,
colors: ['transparent', 'transparent', 'Gradient(white:blue)'],
spline: true,
filled: true,
ymax: 35
}
}).trace();
});
});
</script>