Mention RGraph on Twitter

RGraph: HTML5 Javascript charts library - An example of an animated & interactive Pie chart

[No canvas support]

This example shows animated segment separation. This used to be something that had to be done seperately, however now it's built into the Pie chart as a tooltip effect. You can utilise the effect by using the chart.highlight.style setting like this:


<script>
    window.onload = function ()
    {
        var pie = new RGraph.Pie('cvs', [24,43,51,16,26,23,35]);
        pie.Set('chart.strokestyle', 'rgba(0,0,0,0)');
        pie.Set('chart.labels', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
        pie.Set('chart.tooltips', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
        pie.Set('chart.highlight.style', 'explode');
        pie.Set('chart.labels.sticks', true);
        pie.Set('chart.radius', 100);
        pie.Draw();
    }
</script>

« Back to animation page