JQPlot Legend outside of graph

Garry picture Garry · Jan 22, 2013 · Viewed 12.3k times · Source

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?

Answer

DilanG picture DilanG · Nov 18, 2013
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.