I’ve seen some JavaScript chart libraries around that have cool interactivity using canvas and html5 and best of all they don’t download generated images from the server to display a chart but instead they generate the chart in the browser. Sadly these libraries are still young and don’t have the huge number of charts and options as Microsoft’s ASP.NET chart controls. Is this canvas/html5 technology an option in Microsoft’s ASP.NET chart controls? If not is it coming soon?
I’ve seen some JavaScript chart libraries around that have cool interactivity using canvas and
Share
No. ASP.NET’s Chart library generates raster bitmaps (usually as PNG images). They were written and released around 2005-2006 and so don’t support more recent web technologies such as
<canvas>or HTML5 features.If you’re a wiz with GDI there may be a workaround: change the GDI Image object used by the library from a Bitmap to a GDI Windows Metafile, then convert the Metafile to SVG and present that to the client.
…or just use Google Charts.
Don’t get your hopes up – the chart library is a member of the ASP.NET Web Forms library (being a subclass of
Control) and MVC is currently in-fashion. However, for some of my projects I reverse-engineered the Charting library into a platform-independent library by stripping out all references to ASP.NET and having it generate chart images regardless of context (for some reason those classes are marked asinternal). It’s a lot more flexible that way, I suspect Microsoft did this intentionally to placate Dundas who they licensed the charting library from.