Previous Examples Next

jqPlot support axis labels through the "label" option of each axis. The default label renderer creates labels in div tags, which allows full css control over every label. Labels are assigned css classes like "jqplot-axis_name-label" where "axis_name" will be xaxis, yaxis, etc.




By including the "jqplot.canvasTextRenderer.min.js" and "jqplot.canvasAxisLabelRenderer.min.js" plugins, you can render label text directly onto canvas elements. This allows text to be rotated and yaxes will have their labels rotated 90 degrees by default. By default the labels will be rendered using the Hershey font metrics and not stroked as text. Most recent browsers (include IE 9) support native text rendering in canvas elements.



      

If a visitors is using a browser suppporting native canvas fonts, the plot belowsupported browser, they will see the labels in the plot below rendered as 12 pt Georgia (or their system serif font if Georgia is unavailable). If they are on an unsupported browser, they will see the default Hershey font.