In order to show significantly customised labels you can either
draw the axes yourself using the draw
event
or, as is done in this case, you can use the drawing API Y axis object. The axes are offset slightly by
using the margins so the labels appear to be sitting on top of the grid lines. The axes of the Line
chart are turned off and the color of the axis line is transparent so that just the text labels are visible.
<script src="RGraph.drawing.yaxis.js"></script> <script src="RGraph.common.core.js"></script> <script src="RGraph.common.tooltips.js"></script> <script src="RGraph.common.dynamic.js"></script> <script src="RGraph.line.js"></script>Put this where you want the chart to show up:
<div style="float: right; border: 1px solid gray"> <canvas width="600" height="250" style="float: right" >[No canvas support]</canvas> </div>This is the code that generates the chart: