[dojo-contributors] Chart Markup Proposal
ttrenka at gmail.com
Wed Aug 29 18:59:27 EDT 2007
> It would be cool if the charting widget was designed to work with the
> existing datastore notification mechanism. If the widget listened for
> the datastore onNew/onDelete/onSet notifications, then it shouldn't have
> to do periodic polling for updates.
> The datastore itself may still do polling to get the updates, but that
> becomes an implementation detail hidden in the datastore. Some
> datastores may use comet rather polling to get updates. Additionally,
> some updates may not come from the server, but may come from edits made
> by the user on the client, in which case you want to update the chart
> immediately, not after 5 seconds.
One thing we need to keep in mind is that charts (especially large charts)
can take a long time to render, particularly if there are a lot of points on
it. I'm not interested in throttling unnecessarily but at the same time if
we're talking about something pushed to the desktops of, say, a Fortune100
company with a lot of Windows 2000 machines all running FF1.5, the
perception will end up being "Dojo sucks", and that's not something I want
At the same time, we could probably do something where update notifications
are caught by the charting engine and rendered periodically. The main thing
to think of here is to let the charting widget determine when an update is
made (as opposed to a Store); from experience I've found that this is (by
far) the best method.
Think about things like Task Manager (Windows) or Activity Monitor (OS X).
Both update themselves as opposed to letting the information feeding them
update them; think "this is the snapshot at N" as opposed to "this is an
immediate reflection of data updates". The latter seems to be the most
intuitive but in terms of rendering (particularly through a DOM) the former
is the most fluid.
Plus we need to consider that the chart widget itself may be the one asking
the store for the update...
Bottom line: I see where you're coming from but I'd rather keep a queued
PS. If it helps, I think the floor will probably be between 0.5 and 1 second
for updates; I may try to calculate it based on the dimensions of the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dojo-contributors