Adjusting your charts interactively - Bar chart

Recommend RGraph:  
    Read comments... [No canvas support]

The Bar chart has the facility to be adjusted. There are three custom RGraph events associated with it:

See below for an example of using these events.


<script>
    window.onload = (function ()
    {
        var bar = new RGraph.Bar({
            id: 'cvs',
            data: [5,14,12,13,10,16],
            options: {
                colors: ['red'],
                adjustable: true,
                margin: 5,
                tickmarksInner: true,
                labelsInner: true,
                unitsPost: '%',
                gutterRight: 45,
                ymax: 100,
                title: 'An adjustable Bar chart',
                textAccessible: true
            }
        }).draw().on('onadjustbegin', function (obj)
        {
            // ...
        }).on('onadjust', function (obj)
        {
            // ...
        }).on('onadjustend', function (obj)
        {
            // ...
        })
    })
</script>

The RGraph adjusting events

There are three RGraph events associated with adjusting. The onadjustbegin event fires when adjusting begins. Much like the onmousedown event. The onadjust event fires during adjusting, much like the onmousemove event. The onadjustend event fires when adjusting is finished, much like the onmouseup event.

Comments