我正在尝试从数据库中获取数据并以dojo柱形图的形式显示。我已成功显示了该图,但未填充数据。
.html
var store = new dojox.data.QueryReadStore({ url: "http://localhost:9080/Test/dojochart"});
console.log(store);
var ch = new dojox.charting.Chart2D("chart1",{title:"Population",titlePos:"bottom",titleFontColor:"Red"});
//ch.setStore(store, {CityName:"*"}, "CityPopulation");
ch.setTheme(dojox.charting.themes.Tom);
ch.addPlot("default",{type:"Columns",gap: 5});
ch.addAxis("x",{labels:[{value:1,text:"Mumbai"},
{value:2,text:"Pune"},
{value:3,text:"Delhi"},
{value:4,text:"Nagpur"},
{value:5,text:"Rajasthan"},
{value:6,text:"Indore"}],
fixLower:"major",fixUpper:"major",min:0, max:6});
ch.addAxis("y",{vertical:true,fixLower:"major",fixUpper:"major",min:50,max:700});
//var ser = new dojox.charting.StoreSeries(store, {CityName:"*"}, 'CityPopulation');
ch.addSeries("series",[store],{plot:"default",stroke:{color:"White"},fill:"lightblue"});
ch.render();
需要您的帮助。请告诉我我错了。