Share: Bookmark with delicious tweet this site Post to Facebook

RGraph: HTML5 canvas graph library - Adjusting your graphs interactively - Tradar chart

[No canvas support]

The Tradar chart can be adjusted by dragging the points on the chart. When the onadjustend event fires, you will find the following information in the RGraph registry - RGraph.Registry.Get('chart.adjusting.tradar.myc') - where myc is the ID of your canvas:


<script>
    window.onload = function (e)
    {
            var tradar = new RGraph.Tradar('myc', [4,3,8,6,8,7,7,4,5], [7,2,4,5,4,3,3,3,3]);
            tradar.Set('chart.adjustable', true);
            tradar.Set('chart.colors', ['rgba(255,0,0,0.5)', 'rgba(255,255,0,0.5)']);
            tradar.Set('chart.labels', ['Hoolio', 'Godfrey', 'Albert', 'Jeff', 'Jack', 'Pete', 'Lou', 'Barney', 'Fred']);
            tradar.Draw();
            
            RGraph.AddCustomEventListener(tradar, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.tradar.myc'));});
    }
</script>