Chart.Scatter
Chart.Scatter copied to clipboard
Date Scale X Axis not displaying properly on FireFox
My chart displays like this on FireFox,
there's no errors shown in the deverloper console.
But it displays correctly on Chrome
I am using the latest version of Chart.Scatter,
some code sample data generation/chart generation
var data_item = {
name: "data_item",
label: "Data Item",
strokeColor: color,
fillColor: color,
pointStrokeColor: color,
pointColor: "rgba(0,0,0,0)",
data: [{
r: 1,
x: new Date("03-03-16"),
y: 5,
}, {
r: 1,
x: new Date("03-07-16"),
y: 4,
}, {
r: 5,
x: new Date("03-08-16"),
y: 2,
}, {
r: 5,
x: new Date("03-12-16"),
y: 2,
}, {
r: 1,
x: new Date("03-20-16"),
y: 5,
}, ],
}
var data_set = [data_item, data_item2, data_item3 ...]
var config = {
scaleType: "date",
responsive: true,
animation: false,
maintainAspectRatio: false,
// pointDot : false,
multiTooltipTemplate: "<%= datasetLabel %>: <%= value %>",
tooltipTemplate: "<%= datasetLabel %>: <%= value %>",
scaleTimeFormat: " ",
};
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx).Scatter(dataset, config);