[dojo-contributors] Chart Markup Proposal

Kun Xi bookstack at gmail.com
Fri Aug 31 13:47:18 EDT 2007


Hello,

These are my two cent when I worked towards integrating dojox.gfx3d into chart:

Chart is more complicated than my expectation, I took two desktop
applications as the examples: Excel, the programming language in
business world, and SigmaPlot, a commercial plot utility commonly used
in science.

If we would like to take 3D chart into account, the Z-axis is added
for values, and X-axis, Y-axis for series, otherwise, X-axis holds
series, Y-axis stands for the value. The chart is composed in the
following parts:

Title: title of the chart, x-axis, y-axis, z-axis
    more attributes: font, rotation, pos

Axis: x, y, z
    more attributes: line style and direction.

Tick: major tick, minor tick of x, y, z
   more attributes: linear, logarithm

Wall: aka the background of the 2D chart
   more attributes: color

Grid:
   more attributes: color, line style, consider a oscilloscope

Series: series holds the real data, for pie chart, one value is one series.
  more attributes:
       fillStyle, used later for lighting;
       name: used for legend, if it is missing, the default naming
scheme is S0, S1...

Data marker: mark the value of the series

legend.

Advanced users may request to put two non-relevant series in one chart
with two Z-axis, for example, running time and speed up (God bless
them).

Personally I prefer KISS, the chart just exposes minimum but complete
attributes to the users, and the default implementation fits for most
of normal users. if the users want more control, write the code.

The minimum set of description of a chart is:

type:   which chart type are you using?
title:   chart title, x, y, z titles
width, height: dimension of the chart, (including the legend, axes)
bindings: the series with name attribute.
updateInterval="5"
onUpdate. -- update functionality

The chart itself would figure out the range of x, y, z, tick, use
auto-generated fillStyle, default lighting source to render the chart,
use the series names and fillStyles to render legend.

No idea about the zoom/pan, since I am not quite sure about the
requirement so far.


Best regards,
Kun Xi

-- 
Blog: http://www.kunxi.org



More information about the dojo-contributors mailing list