Sets the value of specified property in crosshair.
Parameters:var chart = new CanvasJS.Chart("container",
{
.
.
axisX: {
crosshair: {
enabled: true,
snapToDataPoint: false
},
.
},
.
.
});
chart.render();
chart.axisX[0].crosshair.set("snapToDataPoint", true);
Please refer to crosshair element for the complete list of properties that can be accessed via set method.