spacing: Number/String

spacing property allows you to control the space occupied by Custom Break. Value can either be in pixels (number – ex: 5) or percent (string – ex: “4%”). Percent values are relative to corresponding Axis length.

Default: Automatically Calculated
Example: 5, 8, “3%”, “5%”
Notes
  • Pixel values are Numbers
  • Percent values are strings ex: “4%”
  • Percent values are relative to the minimum of plot area’s width or height.
  • spacing is limited to a maximum of “10%” of Axis length.
var  chart =  new  CanvasJS.Chart("chartContainer",
{
 .
 .
 axisX: {
    scaleBreaks: {
	customBreaks: [{
	    spacing: "2%",
            .
            .
        }]
    }

 },
 .
 . 
});
chart.render();

Try Editing The Code

  Also See:    


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