如何在Flot Charts中修复移位的网格?

时间:2016-06-27 15:42:17

标签: jquery html flot

我使用https://github.com/flot/flot

我制作图表:

$.plot("#chart", [data.points], {
        series: {
            label: data.title,
            lines: {
                show: true,
            },
            points: {
                show: true
            },
        },
        yaxis: {
            tickDecimals: 0,
            alignTicksWithAxis: 1
        },
        xaxis: {
            mode: "time",
            timeformat: "%d/%m/%Y",
            show: true,
            minTickSize: [1, "day"],
            min: (new Date(2016, 5, 21)).getTime(),
            max: (new Date(2016, 5, 28)).getTime(),
            alignTicksWithAxis: 1
        },
        grid: {
            borderWidth: 1,
            labelMargin:10,
            hoverable: true,
            clickable: true,
            mouseActiveRadius:15
        },
        legend:{
            container: '.flc-legend',
            backgroundOpacity: 0.5,
            noColumns: 0,
            lineWidth: 0
        }
    });

但网格转移了。如何解决?

我将截图附加到问题:

screenshot

数据: [[1466974800000,10],[1466888400000,10],[1466802000000,10] ...]

0 个答案:

没有答案