Adjusting your charts interactively - HProgress bar

  Read comments...

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

[No canvas support]
<script>
    window.onload = (function ()
    {
        var hprogress = new RGraph.HProgress({
            id: 'cvs',
            min: 0,
            max: 100,
            value: 83,
            options: {
                gutterBottom: 30
                colors: ['Gradient(white:red)'],
                adjustable: true,
                margin: 5,
                tickmarksInner: true,
                tickmarksZerostart: true,
                unitsPost: '%',
                textAccessible: true
            }
        }).draw().on('onadjustbegin', function (obj)
        {
            // ...
        }).on('onadjust', function (obj)
        {
            // ...
        }).on('onadjustend', function (obj)
        {
            // ...
        });
    })
</script>

Share RGraph
X

Comments