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.
  1. var chart = new CanvasJS.Chart("chartContainer",
  2. {
  3. .
  4. .
  5. axisY: {
  6. scaleBreaks: {
  7. customBreaks: [{
  8. spacing: "2%",
  9. .
  10. .
  11. }]
  12. }
  13.  
  14. },
  15. .
  16. .
  17. });
  18. chart.render();

Try Editing The Code

  Also See:    


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