0
私はdojoスパイダーチャートを埋めるためにjsonデータを必死に使用しようとしています。dojo/dojoxスパイダーチャートのJSONフォーマット
まず最初に、私のスパイダーチャートに使用する前に、私のストア(ItemFileReadStoreから取得)をdojox.charting.DataSeriesに渡す必要がありますか?
次に、jsonはどのように見える必要がありますか?
var data = {"identifier":"id","items":[
{"id": "1", "data": {"GDP": 2,"area": 6,"population": 2000,"inflation": 15,"growth": 12}},
{"id": "2", "data": {"GDP": 6,"area": 15,"population": 500,"inflation": 5,"growth": 6}},
{"id": "3", "data": {"GDP": 10,"area": 10,"population": 800,"inflation": 2,"growth": 18}}
]
};
var fileStore = new dojo.data.ItemFileWriteStore({data: data});
var store1 = new dojox.charting.DataSeries(fileStore, {query: {id:"1"}}, "data");
var store2 = new dojox.charting.DataSeries(fileStore, {query: {id:"2"}}, "data");
var store3 = new dojox.charting.DataSeries(fileStore, {query: {id:"3"}}, "data");
chart1.addSeries("USA", store1, { fill: "green" });
chart1.addSeries("Japan", store2, { fill: "yellow" });
chart1.addSeries("Korean", store3, { fill: "orange" });
chart1.render();
任意のアイデア:
これは、私はちょうどそれを試してみました方法ですか?