dataPointWidth sets the width of dataPoints in column / bar, ohlc and candlestick, charts. This allows you to fix the width of dataPoints such that their width doesn’t change when the total number of dataPoints varies. At the same time, when the number of dataPoints increase, it can lead to overlap if dataPointWidth is not set properly.
Default : Automatically calculated based on the chart size.var chart = new CanvasJS.Chart("container", { . . dataPointWidth: 20, . . }); chart.render();
Also See:
5 Comments
datapPointWidth is not working for Doughnut Chart ?
Emily,
dataPointWidth sets the width of dataPoints in column / bar, ohlc and candlestick, charts only. For Doughnut Chart use innerRadius and radius to set the required width.
This doesn’t seem to work for rangeBar?
This doesn’t seem to work for the rangeBar chart. Any ideas on how to change the width of the bars in the rangeBar chart type?
Kelsey,
You can use dataPointWidth to set the width of rangeBar chart aswell. We checked and it seems to be working fine. If you are still facing the issue, kindly reproduce the same in a jsfiddle, so that we can check and resolve it.