ポイントにカーソルを合わせると、 canvas.jsグラフのツールチップに「12:00AM: 0.0645840023」と表示されるのはなぜですか?
JSFiddle: http://jsfiddle.net/ssjqoa64/2/
コンテナ/ウィンドウの幅を広げると、 12AM bug が表示されます。非常に奇妙なバグ。
代わりに日付を表示する必要があります。
window.onload=function () {
CanvasJS.addColorSet("colset", ["#337ab7"]);
var chart=new CanvasJS.Chart("chartContainer", {
colorSet: "colset", backgroundColor: "#f5f5f5", zoomEnabled: true, exportEnabled: true, exportFileName: "Earnings Chart", axisX: {
labelFontFamily: "tahoma"
}
, axisY: {
labelFontFamily: "tahoma",
}
, data: [ {
type: "area", dataPoints: [ {
x: new Date(2015, 12, 29), y: 0.016440000385046
}
, {
x: new Date(2015, 12, 30), y: 0.064584002396259
}
, {
x: new Date(2015, 12, 31), y: 0.0098100002505817
}
, {
x: new Date(2016, 1, 1), y: 0.34803301144257
}
, {
x: new Date(2016, 1, 2), y: 0.20135760693211
}
, ]
}
]
}
);
chart.render();
}