This property allows you to set the padding for crosshair label in axisY.
Default: 0
- var chart = new CanvasJS.Chart("container", {
- .
- .
- axisY: {
- crosshair: {
- enabled: true,
- labelPadding: 2,
- .
- .
- }
- },
- .
- .
- });
- chart.render();
labelPadding can also be an object containing top, right, bottom and left properties for different padding along top, right, bottom and left sides, respectively.
- var chart = new CanvasJS.Chart("container", {
- .
- .
- axisY: {
- crosshair: {
- labelPadding: {
- top: 1,
- right: 1,
- bottom: 2,
- left: 2
- }
- }
- },
- .
- .
- });
- chart.render();