1

何らかの理由で、jqplot はラベルを正しくレンダリングせず、最終的にすべての線の点をチャートの最後に押し込んでいます。これがどのように見えるかです...

これは次のようになります。

ここに画像の説明を入力

以下は、プロットポイントを含むJSです...

var _a212064_plot_properties;
$(document).ready(function ()
{
    _a212064_plot_properties =
    {
        "legend" :
        {
            "show" : true
        },
        "series" : [
            {
                "label" : "Current Year"
            },
            {
                "label" : "Previous Year"
            }
        ],
        "axes" :
        {
            "xaxis" :
            {
                "tickOptions" :
                {
                    "formatString" : "%b"
                },
                "label" : "Date",
                "min" : "07\/01\/2012 00:00:00",
                "tickInterval" : "1 Month",
                "renderer" : $.jqplot.DateAxisRenderer,
                "properties" : "xaxis"
            },
            "yaxis" :
            {
                "tickRenderer" : $.jqplot.CanvasAxisTickRenderer,
                "tickOptions" :
                {
                    "angle" : -30,
                    "labelPosition" : "middle"
                },
                "labelRenderer" : $.jqplot.CanvasAxisLabelRenderer,
                "labelOptions" :
                {
                    "fontSize" : "13pt"
                },
                "label" : "Organic Visits",
                "properties" : "yaxis"
            }
        },
        "highlighter" :
        {
            "bringSeriesToFront" : true,
            "tooltipLocation" : "n",
            "tooltipOffset" : "0",
            "formatString" : "Point <\/span>%s: %s<\/strong><\/div>"
        },
        "cursor" :
        {
            "show" : true,
            "zoom" : true
        }
    }

    $.jqplot.config.enablePlugins = true;
    $.jqplot.config.defaultHeight = 300;
    $.jqplot.config.defaultWidth = 400;
    _a212064 = $.jqplot("a212064", [[[1341115200, 2330], [1343793600, 2768], [1346472000, 2462], [1349064000, 2331], [1351742400, 2198], [1354338000, 2258], [1357016400, 2763], [1359694800, 2399], [1362114000, 2643], [1364788800, 1550], [1367380800, 621], [1370059200, 356]], [[1341115200, 4654], [1343793600, 4105], [1346472000, 4347], [1349064000, 4163], [1351742400, 3849], [1354338000, 5579], [1357016400, 4908], [1359694800, 3690], [1362114000, 2314], [1364788800, 3173], [1367380800, 2608], [1370059200, 2330]]], _a212064_plot_properties);

}
);

何か案は?そのラベルに日付を入れることは、私が理解できない最後のことです.

ありがとう!

4

1 に答える 1

1

のパラメータを変更する必要がありますxaxis

コードの作業コピーは次のとおりです: Jsfiddle リンク

var _a212064_plot_properties;
$(document).ready(function ()
{
    _a212064_plot_properties =
    {
        "legend" :
        {
            "show" : true
        },
        "series" : [
            {
                "label" : "Current Year"
            },
            {
                "label" : "Previous Year"
            }
        ],
        "axes" :
        {
            "xaxis" :
            {

                "label" : "Date",
                "renderer" : $.jqplot.DateAxisRenderer
            },
            "yaxis" :
            {
                "tickRenderer" : $.jqplot.CanvasAxisTickRenderer,
                "tickOptions" :
                {
                    "angle" : -30,
                    "labelPosition" : "middle"
                },
                "labelRenderer" : $.jqplot.CanvasAxisLabelRenderer,
                "labelOptions" :
                {
                    "fontSize" : "13pt"
                },
                "label" : "Organic Visits"
            }
        },
        "highlighter" :
        {
            "bringSeriesToFront" : true,
            "tooltipLocation" : "n",
            "tooltipOffset" : "0",
            "formatString" : "Point <\/span>%s: %s<\/strong><\/div>"
        },
        "cursor" :
        {
            "show" : true,
            "zoom" : true
        }
    }

    $.jqplot.config.enablePlugins = true;
    $.jqplot.config.defaultHeight = 300;
    $.jqplot.config.defaultWidth = 400;
    _a212064 = $.jqplot("a212064", [[[1341115200, 2330], [1343793600, 2768], [1346472000, 2462], [1349064000, 2331], [1351742400, 2198], [1354338000, 2258], [1357016400, 2763], [1359694800, 2399], [1362114000, 2643], [1364788800, 1550], [1367380800, 621], [1370059200, 356]], [[1341115200, 4654], [1343793600, 4105], [1346472000, 4347], [1349064000, 4163], [1351742400, 3849], [1354338000, 5579], [1357016400, 4908], [1359694800, 3690], [1362114000, 2314], [1364788800, 3173], [1367380800, 2608], [1370059200, 2330]]], _a212064_plot_properties);

}
);
于 2013-07-30T17:53:06.030 に答える