Adjusting charts: Horizontal Progress bar

The Horizontal Progress Bar can be adjusted by clicking on it. When adjusting is finished the adjustend event fires. If you attach a function to the adjustend event (as below) you can get the new value by looking at the value property (eg obj.value).

    hprogress = new RGraph.HProgress({
        id: 'cvs',
        min: 0,
        max: 100,
        value: 83,
        options: {
            marginBottom: 30,
            colors: ['Gradient(white:red)'],
            adjustable: true,
            margin: 10,
            tickmarksInner: true,
            tickmarksZerostart: true,
            scaleUnitsPost: '%'
    }).draw().on('adjustbegin', function (obj)
        console.log('The adjustbegin event has fired.');
    }).on('adjust', function (obj)
        console.log('The adjust event has fired.');
    }).on('adjustend', function (obj)
        console.log('The adjustend event has fired.');

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.