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 : null
Example : 2, 10, 25, etc.
Notes
  • 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 Editing The Code

  Also See:    


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

5 Comments

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

      • Jagadesan says:

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

        • Sanjoy says:

          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