dataPointMinWidth: Number

dataPointMinWidth sets the minimum width of dataPoints in column / bar, ohlc and candlestick, charts. This allows you to set a minimum limit on the width of dataPoints so that they don’t become very thin when there are too many dataPoints. At the same time, when the number of dataPoints decrease, chart increase their width automatically.


Default : 1.
Example : 2, 10, 25, etc.

Note
  • Supported in all types of column / bar charts, ohlc and candlestick charts.
  • dataPointMinWidth should be less than dataPointMaxWidth.
  • Increasing dataPointMinWidth can lead to column/bar overlap when there are large number of dataPoints.

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 dataPointMinWidth: 2,
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



If you have any questions, please feel free to ask in our forums.Ask Question

Comments 5

  1. Pingback: CanvasJS Charts 1.8.0 Beta 4 Released with dataPointMinWidth and dataPointMaxWidth - CanvasJS

      • Any work around on this to set set different dataPointMinWidth for different data sets?

        • Sorry, as of now this feature is not available. Currently you can control dataPointWith or dataPointMaxWith/dataPointMinWidth for all the dataSeries.

If you have any questions, please feel free to ask in our forums. Ask Question