An interactive line-chart without plugins

I wrote a quick and dirty line chart that is interactive without using flash or any other plugin – it uses Microsoft’s Vector Markup Language (VML) along with javascript. Although I feel dirty for doing something Microsoft specific, anabolics I’m planning to build it into a demo for work (where the apps are alarmingly short of data visualization), and the web-applications are IE-only due to activex plugins.

The example is here.

The chart could be improved in many ways, such as a fill under the line, some markers to indicate the original position of the chart as it is edited, larger click targets for the vertexes, some animations on mouseover. But since I’m not sure any of that will ever happen, I’m putting it up in case someone else can learn from it.

With Canvas and SVG support making it into the the other browsers, VML in IE, and a graphics api (like dojo.gfx/dojo.2d) that will hide the differences, it looks like there could be quite a bit of client-size rendering coming to the web in the not too distant future. (google maps already uses vml as a fall back from transparent pngs for drawing the route in IE)

Incidentally I did most of the work using Aptana which is a quite capable Javascript editor.

One thought on “An interactive line-chart without plugins”

Leave a Reply

Your email address will not be published. Required fields are marked *