Spline / Curved Line is used as an alternative to Line to make the data look smoother. Library supports crosshair over both x and y-axes. In the below example, try disabling crosshair by setting enabled property to false.
window.onload = function () {
var dataPoints = [];
var stockChart = new CanvasJS.StockChart("stockChartContainer",{
theme: "light2", //"light1", "dark1", "dark2"
title:{
text:"Ethereum Closing Price"
},
charts: [{
axisX: {
crosshair: {
enabled: true,
snapToDataPoint: true
}
},
axisY: {
prefix: "$",
crosshair: {
enabled: true,
snapToDataPoint: true,
valueFormatString: "$#,###.##"
}
},
toolTip: {
shared: true
},
data: [{
type: "spline",
name: "Price",
yValueFormatString: "$#,###.##",
dataPoints : dataPoints
}]
}],
navigator: {
slider: {
minimum: new Date(2018, 08, 01),
maximum: new Date(2018, 10, 01)
}
}
});
$.getJSON("https://canvasjs.com/data/docs/ethusd2018.json", function(data) {
for(var i = 0; i < data.length; i++){
dataPoints.push({x: new Date(data[i].date), y: Number(data[i].close)});
}
stockChart.render();
});
}