我正在使用 jqPlot 创建带有图例的饼图。我的 jqPlot 饼图选项的一部分如下所示:
seriesDefaults: {
renderer: $.jqplot.PieRenderer,
rendererOptions: {
padding: 10,
showDataLabels: true,
dataLabelFormatString: '%.2f%%',
sliceMargin: 2,
startAngle: -90
}
},
legend: {
show: true,
location: 'e',
placement: 'outside',
xoffset: 1,
fontSize: '11px',
rowSpacing: '10px',
textColor: '#222222',
fontFamily: 'Lucida Grande, Lucida Sans, Arial, sans-serif'
}
最近我遇到一个案例,其中有很多图例项(例如 21),这使得我的图例框太高。我想知道是否有办法
- 图例框中有一个垂直滚动条
- 在多列中显示图例项(首选)
我尝试设置以下属性:
我从这个页面找到的:
$.jqplot.PieRenderer 选项 http://www.jqplot.com/docs/files/plugins/jqplot-pieRenderer-js.html#%24.jqplot.PieLegendRenderer.numberRows
然而他们似乎没有做出任何改变。
有人能为我提供一个好的解决方案来解决这个问题吗?