X轴间隔标签与float js重叠

时间:2019-03-20 15:02:21

标签: javascript jquery graph

我正在使用Float JS图表开发折线图,以显示报告案例。 除X轴标签外,其他所有功能均正常。 似乎有超过50个以上的x轴间隔,因此它与 彼此。 Click here to view the x-axis labels intervals are overlapped

function Callsdata(sin) {
    var line_data1 = {
        data: sin,
        color: '#3c8dbc'
        //labels  : ['730', '745', '800', '815', '830', '845', '900','915','930'],

    }


    $.plot('#line-chart', [line_data1], {

        grid: {
            hoverable: true,
            borderColor: '#f3f3f3',
          borderWidth: 2,
            tickColor: '#f3f3f3',


        },
        series: {
            shadowSize: 0,
            lines: {
                show: true,
            },
            points: {
                show: true
            }
        },
        lines: {
            fill: false,
            color: ['#3c8dbc', '#f56954']
        },
        yaxis: {
            show: true

        },
        xaxis: {
            show: true,
            //position: 'bottom',
            //tickSize: 15,
            ticks: [730,745,800,815,830,845,900,915,930,945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830],
            //tickLength: 50,
            //tickSize: [15, "minutes"],
            //ticks: [[8, 730], [8, 745], [3,800], [5,815], [34,830], [38,845], [25,900], [31,915], [34,930], [43,945], [55,1000], [45,1015], [51,1030], [45,1045], [41,1100], [71,1115], [64,1130], [73,1145], [63,1200], [39,1215], [30,1230], [39,1245], [56,1300], [42,1315], [45,1330], [46,1345], [48,1400], [46,1415], [31,1430], [38,1445], [53,1500], [39,1515], [51,1530], [34,1545], [45,1600], [42,1615], [41,1630], [46,1645], [24,1700], [29,1715], [23,1730], [29,1745], [19,1800], [17,1815], [2,1830]],
            //ticks:[[8,730], [8,745], [3,800], [5,815]],
            min: 700,
            max: 1830,
            minTickSize: 10,
            tickMarkLength:20,
            labelWidth: 100,
            axisLabel: "Month",
            axisLabelUseCanvas: true,
            axisLabelFontSizePixels: 12,
            axisLabelFontFamily: 'Verdana, Arial',
            axisLabelPadding: 10,
            crosshair: true,
            font: {

                size: 4,
                lineHeight: "20px",

                style: "italic",
                weight: "bold",
                family: "sans-serif",
                variant: "small-caps",
                color: "black",



            }




        }




    })

}

请以任何可能的方式帮助我解决这个问题。

0 个答案:

没有答案