A Scatter chart using date/time values

[No canvas support]

This demo shows how you can use date/time values as X values with the Scatter chart. Although it's a Scatter chart it can also show a line that connects the points, as you can see on the example to the right. The chart has two datasets, one of which is set to be drawn as being stepped.

The date/time format parsing in RGraph is done by the RGraph.parseDate() function internally and this function is quite versatile in the formats that it accepts.

This means that you are free to use many different formats for the date/time values that you supply. Some of the different formats that are accepted are shown in the source code below.

For smaller screens the text size is reduced and the CSS float is reduced.


This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.scatter.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="200">
    [No canvas support]
</canvas>
This is the code that generates the chart: