Here’s a good idea : make a new widget that will display charts related to a page. I had a few problems building this since the template must have set some parameters like style, width and height otherwise your chart wont’ display and you’ll get a wierd error. I’ll give you a very simple example on how to start building this idea.

Here’s my template :

Statistics


Note that the style=”width …” *must* be there otherwise the chart won’t display.
Let’s continue …

dojo.provide("mywidget.stats");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.charting.Chart2D");

dojo.declare("mywidget.stats",
[dijit._Widget,dijit._Templated],
{

widgetsInTemplate:true,

templatePath: dojo.moduleUrl("mywidget","templates/Stats.html"),

postMixInProperties: function(){

},

postCreate: function(){

var chart1 = new dojox.charting.Chart2D("test");
chart1.addPlot("default", {type: "Pie"});
chart1.addAxis("x");
chart1.addAxis("y", {vertical: true});
chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]);
chart1.render();

},

startup: function(){

},

}
);

Well nothing big here but it works 😉
I’m trying actually to develop multiple statitics that I’ll probably end putting in tabs. We’ll see, maybe later if I have good results I’ll post somehting here 😉

See ya guys !