views:

361

answers:

4

How do I draw procedural graphics in a Vista Sidebar gadget?

I have a gadget that collects data over time and I want to draw animating graphs. My current approach is to draw the graph with VML that I update from JScript on a timer tick. Is this the best way? Can I return bitmap bits from a DLL function as the srouce to an <IMG>? Embed bitmap bits into the HTML itself (and again update it via JScript)? I'd love to hear some ideas.

Thanks!

A: 

The way I currently do it is with Javascript and Adobe Flash Player communicating via the ExternalInterface in ActionScript. It seamlessly integrates local Javascript instances with an instance of a Flash Player and you can communicate just about anything between the two. You can use the fantastic drawing API in ActionScript and really get some power into you hands for charting or just embed some tools off the net.

But then, if the sandbox permits it, generating data by targeting DLLs would be great! I don't have anything functional at hand to test it, so I leave it to other contributors.

kRON
+1  A: 

You can use Silverlight 2 with Sidebar gadgets now - the Silverlight toolkit available on Codeplex (http://www.codeplex.com/Silverlight) includes charting controls (which support animation), so that should be relatively straightforward.

Kevin Daly
A: 

im faced with the same issue right now if anyone has any other suggestions. Silverlight in a gadget will not work on a 64 bit OS by the way. Limitation of Silveright at the moment.

Mark Woodlief
A: 

How about wz_jsgraphics ?

DHTML graphics via javascript

http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

Chris Morley