A Scatter chart using datetime values

Summary: A Scatter chart which uses datetimes as the X axis values. The datetime parsing in RGraph is quite versatile and can handle a wide variety of formats.

[No canvas support]

This demo shows how you can use datetime 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 datetime 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 datetime 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: