JqPlot Bar Width

I currently have a chart in jquery. If the results show only 1 bar, the problem is that the bar fills the space of the entire chart. How to adjust the width of the panel so that it does not look like a log.

+5
source share
2 answers

If you still want your charts to display dynamically with the number of bars / chart size, use the barMargin and barPadding values ​​to adjust the width of your bars.

seriesDefaults: {
  renderer: $.jqplot.BarRenderer,
  rendererOptions: { 
    barPadding: 4,
    barMargin: 5
},

- 8 10 , . , , .

barMargin - . barPadding - , .

. http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html.

+6

All Articles