Chart.Scatter icon indicating copy to clipboard operation
Chart.Scatter copied to clipboard

Date Scale X Axis not displaying properly on FireFox

Open jiangmf opened this issue 8 years ago • 0 comments

My chart displays like this on FireFox, firefox there's no errors shown in the deverloper console.

But it displays correctly on Chrome 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);

jiangmf avatar Mar 23 '16 18:03 jiangmf