An example of the drawing API Y axis object

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.tooltips.js"></script>
<script src="RGraph.drawing.yaxis.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
    [No canvas support]
</canvas>
This is the code that generates the chart:
<script>
    bar = new RGraph.Bar({
        id: 'cvs',
        data: [4,6,8,4,5,3,7,5,4,9],
        options: {
            backgroundGridHlinesCount: 3,
            axes: false,
            yaxisLabels: false,
            colors: ['blue','blue','blue','blue','blue','red','red','red','red','red'],
            colorsSequential: true,
            marginLeft: 100,
            marginBottom: 30
        }
    }).draw();
    
    yaxes = new RGraph.Drawing.YAxis({
        id: 'cvs',
        x: 100,
        options: {
            yaxisScaleMax: 100,
            yaxisTickmarksCount: 6,
            yaxisLabelsSpecific: ['Lots','A fair amount','Not so many','A few'],
            textAccessiblePointerevents: false
        }
    }).on('click', function (e, obj)
    {
        alert('The Y axis has been clicked!');
    }).on('mousemove', function (e, obj)
    {
        e.target.style.cursor = 'pointer';
    }).draw();
</script>