Asual

Friday,
30 Jun 2006

Charts, excanvas and printing

A few months ago I was exited to see the new Canvas based JavaScript Chart engine created by Emil of WebFX. Canvas emulation in Internet Explorer using VML is really challenging, so we can't be more than happy that Google has an open source project that does this job for us.

Yesterday I started evaluating various charting components for a large e-health application and my first choice was the WebFX Chart. Of course Flash is always an option, but we still don't need it that badly and we're trying to avoid it when possible. Everything went smooth, I was able to customize the background and legend suffixes, but then I got stucked: it doesn't print in Internet Explorer. Such issues can be problematic if you want to promote such evolving new technologies.

I had the time to dive into the issue and the VML docs available on the net. It's a powerful technology that in fact has no problem with printing. After some digging I found the problem and here are the two possible solutions:

Using the original excanvas.js you need to add the following CSS to your documents:

You can also hack the library by changing line 56 with the one below:

This is also the bug fix I've proposed to the excanvas team.

Plotkit is also a good charting framework that suffers from the same printing issue.

Opera 9 has good support for the Canvas tag, but looks like it doesn't print it at all. I still haven't the possibility to check the situation with Safari 2.

Update: The fix was accepted and this functionality will be available in the next excanvas release.

« Previous Post | Next Post »

Projects

Syndication

Blog Search

Blog Categories

Blog posts

Recommended sites