A Line chart with out-of-bounds value

This Line shows that you can set a chart.ymax value but instead of having breaks in the line for values that go beyond it, you can set chart.outofbounds to true and the vaues will be shown.

[No canvas support]

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="600" height="250">
    [No canvas support]
</canvas>
This is the code that generates the chart:
<script>
    window.onload = function ()
    {
        var line = new RGraph.Line({
            id: 'cvs',
            data: [1,9,4,3,-2,11,8,4,8,17, 8, 9],
            options: {
                textAccessible: true,
                ymax: 10,
                gutterBottom: 50,
                hmargin: 5,
                tickmarks: 'endcircle',
                outofbounds: true,
                labels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
            }
        }).draw();
    };
</script>

Share on Facebook Share on Twitter

« Back