我目前在jquery中有一个条形图 . 如果结果仅显示1 bar,则问题是条形填充整个图形的空间 . 如何调整条的宽度,使其看起来不像日志 .
尝试在BarRenderer中设置barWidth:
http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html
如果您仍希望图表条动态调整大小的条形图/大小,请使用barMargin和barPadding值来调整条形图的宽度 .
seriesDefaults: { renderer: $.jqplot.BarRenderer, rendererOptions: { barPadding: 4, barMargin: 5 },
默认值分别为8和10,因此上述值实际上会使您的条形更大 . 使值大于默认值以减小条形图的大小 .
barMargin是条形之间的宽度 . barPadding是条形图表示多个系列时类别中条形之间的宽度 .
有关详细信息,请参阅http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html .
2 回答
尝试在BarRenderer中设置barWidth:
http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html
如果您仍希望图表条动态调整大小的条形图/大小,请使用barMargin和barPadding值来调整条形图的宽度 .
默认值分别为8和10,因此上述值实际上会使您的条形更大 . 使值大于默认值以减小条形图的大小 .
barMargin是条形之间的宽度 . barPadding是条形图表示多个系列时类别中条形之间的宽度 .
有关详细信息,请参阅http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html .