jqPlot has the ability to create a legend for a chart. The examples show only vertical legends. I would like to make a horizontal legend. For instance, I want:
X-Label1 X-Label2 X-Label3
And don't want:
X-Label1
X-Label2
X-Label3
Thanks
This is very easy to achieve using the EnhancedLegendRenderer plugin. Just include the plugin and use options similar to this.
legend:{
renderer: $.jqplot.EnhancedLegendRenderer,
show: true,
rendererOptions: {
numberRows: 1
}
}
You just have to set the numberRows
to 1, so the legend will be rendered with only 1 row.