Adjusting charts: Bar chart

Information about adjusting the Bar chart interactively. Adjustable Bar charts are useful if you're doing a presentation (for example) and need to illustrate changes.

[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.

    bar = new RGraph.Bar({
        id: 'cvs',
        data: [5,14,12,13,10,16],
        options: {
            colors: ['red'],
            adjustable: true,
            marginInner: 5,
            yaxis: false,
            yaxisScaleunitsPost: '%',
            yaxisScaleMax: 100,
            marginLeft: 45,
            title: 'An adjustable Bar chart',
            shadow: false,
            backgroundGridVlines: false,
            backgroundGridBorder: false
    }).draw().on('adjustbegin', function (obj)
        // ...
    }).on('adjust', function (obj)
        // ...
    }).on('adjustend', function (obj)
        // ...

The RGraph adjusting events

There are three RGraph events associated with adjusting. The adjustbegin event fires when adjusting begins, much like the mousedown event. The adjust event fires during adjusting, much like the mousemove event. The adjustend event fires when adjusting is finished, much like the mouseup event.