Show legends horizontal in line charts are not working

2,475 views
Skip to first unread message

niewie

unread,
Jun 10, 2012, 1:12:01 AM6/10/12
to jqplot-users

I am trying to display my legends on a line chart horizontally, and
tried to use the numberRows : 1 options but it simply won't work. It
works on some of the other chart types. Can anybody try to make
legends show horizontal on specifically a line chart and let me know
if it works for you?
Thanks!

Benjamin Thatcher

unread,
Jun 15, 2012, 5:42:16 PM6/15/12
to jqplot...@googlegroups.com
I have it setup like this for one of my line charts (the chart has 3 series, so I have 3 columns in the legend):

legend: {
// Enable rows and columns in the legend
renderer: $.jqplot.EnhancedLegendRenderer,
show: true,
// place label on top of graph
location: 'n',
// place label outsid the graph plot and add space above the graph for no overlay
placement: 'outsideGrid',
// set the labels for the legend to the labels array
labels: labels,
// set the number of rows and columns for the legend
marginTop: 0,
rendererOptions: {
numberRows: 1,
numberColumns: 3,
seriesToggle: false,
disableIEFading: true
}
},

Sylvain RAGOT

unread,
Jan 14, 2014, 4:27:05 AM1/14/14
to jqplot...@googlegroups.com
Do not forget to include EnhancedLegendRenderer : 

legend: {
  ...
  renderer: $.jqplot.EnhancedLegendRenderer,
  rendererOptions: {...}
}

<script type="text/javascript" src="js/jquery.jqplot.1.0.8r1250/dist/plugins/jqplot.enhancedLegendRenderer.min.js"></script>
Reply all
Reply to author
Forward
0 new messages