I am using JQPlot and I have many graphs on one HTML page. Each of the graphs has the same legend.
My question is this: Is it possible to display a legend totally outside of the graph with its own position on the HTML page or in its own div?
legend:{
show:true,
renderer: $.jqplot.EnhancedLegendRenderer,
location: 's' ,
placement : "outside",
marginTop : "30px",
rendererOptions: {
numberRows: 1
}
},
You can use placement : "outside" like in the above code. And you can move it using marginTop,marginBottom,marginRight,marginLeft properties.
Maybe you could hide the legend of the 2nd to the last graph, like this:
legend: { show:false}
and in the 1st graph, put something like:
legend:{
show:true,
placement: 'outside',
rendererOptions: {
numberRows: 1
},
location:'n'
This way you will only show one legend at the top of the graphs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With