0

これが私のコードです:

ここで、青色の凡例を使用してクモの巣グラフを作成する必要があります。3軸

<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"></script>
    <script>
    dojo.require("dojox.charting.Chart2D");
    dojo.require("dojox.charting.axis2d.Default");
    dojo.require("dojox.charting.plot2d.Default");
    dojo.require("dojox.charting.plot2d.Spider");
    dojo.require("dojox.charting.axis2d.Base");
    dojo.require("dojox.charting.widget.Legend");

         dojo.ready(

                 function(Chart, Default, Default, Spider, Base,Legend){
             var chart1 = new dojox.charting.Chart("chart1");
             chart1.addPlot("default", {
             type:         "Spider",
             labelOffset:      -10,
             seriesFillAlpha:     0.2,
             markerSize:       3,
             precision:         0,
             divisions:         11,
             spiderType:          "polygon"
         });

        var data= [ {"J":0,"S":0,"I":0},
        {"J":10,"S":10,"I":10},
        {"J":7,"S":4,"I":8} ];

        chart1.addSeries("min", {data: data[0] }, { fill: "blue" });
        chart1.addSeries("max", {data: data[1] }, { fill: "blue" });
        chart1.addSeries("Test", {data: data[2] }, { fill: "blue",text: "Test" });
        chart1.render();
        chart1.removeSeries("min");
        chart1.removeSeries("max");
        var legendTwo = new Legend({chart: chart1}, "legendTwo");

        });


    </script>
</head>
<body>
    <div id="chart1" style="width: 600px; height: 600px;"> </div>
    <div id="legendTwo"></div>


</body>
</html>

そして、なぜラベルと凡例が印刷されないのかわかりません。

削除はdojoxのバグによるものです。

よろしく

Bussiere

4

1 に答える 1

1

問題を誤解しているかもしれませんが、古いモジュール読み込みスタイル (dojo.require) を使用しているため、Legend クラスの完全な名前が必要です。

var legendTwo = new dojox.charting.widget.Legend({chart: chart1}, "legendTwo");
于 2012-12-09T16:02:42.757 に答える