Rev 1372 | Blame | Compare with Previous | Last modification | View Log | RSS feed
Dojo Charting Engine=========================================================================The Dojo Charting Engine is a (fairly) complex object structure, designedto provide as much flexibility as possible in terms of chart construction.To this end, the engine details the following structure:Chart---PlotArea[]------Plot[]---------Axis (axisX)---------Axis (axisY)---------Series[]A Chart object is the main entity; it is the entire graphic. A Chart mayhave any number of PlotArea objects, which are the basic canvas againstwhich data is plotted. A PlotArea may have any number of Plot objects,which is a container representing up to 2 axes and any number of seriesto be plotted against those axes; a Series represents a binding againsttwo fields from a data source (initial rev, this data source is always oftype dojo.collections.Store but this will probably change once dojo.datais in production).The point of this structure is to allow for as much flexibility as possiblein terms of what kinds of charts can be represented by the engine. Thecurrent plan is to accomodate up to analytical financial charts, which tendto have 3 plot areas and any number of different types of axes on each one.The main exception to this is the pie chart, which will have it's owncustom codebase. Also, 3D charts are not accounted for at this time,although the only thing that will probably need to be altered to makethat work would be Plot and Series (to accomodate the additional Z axis).Finally, a Plot will render its series[] through the use of Plotters, whichare custom methods to render specific types of charts.-------------------------------------------------------------------------In terms of widgets, the basic concept is that there is a central, super-flexible Chart widget (Chart, oddly enough), and then any number of presetchart type widgets, that are basically built to serve a simple, easypurpose. For instance, if someone just needs to plot a series of lines,they would be better off using the LineChart widget; but if someone neededto plot a combo chart, that has 2 Y Axes (one linear, one log) against thesame X Axis, using lines and areas, then they will want to use a Chart widget.Note also that unlike other widgets, the Charting engine *can* be calleddirectly from script *without* the need for the actual widget engine to beloaded; the Chart widgets are thin wrappers around the charting engine.