Drawing Graphs on Your Browser? 201
Pieroxy queries: "I recently had a look at various ways to draw a graph (lines, bar chart, pie chart...) for a web-based enterprise application. As we need some interactivity, the GIF image generated on the server-side is not an option. Here is the list of technologies I can think of: Flash is probably over kill and a closed technology. Java is very flexible but slow (to start and run). SVG (discussed here) still requires a plugin. VML is supported only on IE5+, but it is natively supported. Which one of these technologies is the more flexible and interactive? Is it reasonable to require a plugin from the end users of our enterprise application? Is IE5+ a wide enough target for an enterprise application?"
Do you need all chart types, or just one? (Score:5, Insightful)
IE5...not quite (Score:5, Insightful)
Internet Explorer 5 and above are very widely-used. However, they are still flawed browsers and, due to the announcement that these browsers will no longer be updated as standalone applications, many people may switch to another browser. Also, those using a Unix-based platform (read: GNU/Linux) no longer have any viable way of using Internet Explorer. If it is not easy to change back and forth, the already limited audience VML will reach even less as time goes on.
As an opinion only, if SVG is an option, it may be best in the long run. Assuming it is not easy to acrobatically jump from one option to the next (if that was possible, you could serve VML to IE 5.5+ and SVG to Mozilla, and some raster format for any other browsers), SVG holds the best promise. SVG is already supported as a plug-in (much like flash). It is about to be tested as a native part of the Mozilla browser. Over time, compatibility will actually improve--not something Java or VML can say easily. Also, as compatibility improves, simple scripting can make the charts interactive or real-time (or other neat fancy stuff).
Why not an imagemap? (Score:3, Insightful)
Surely an image with an onClick and some Javascript will do what you ask of it?
Re:IE5...not quite (Score:2, Insightful)
You sir, are incapable of consistant thought.
You monkey.
If it's meant to be this interactive.. (Score:5, Insightful)
Flash isn't as bad as it used to be (Score:4, Insightful)
The only problem is that the tutorials and manuals are aimed purely at designers, not at programmers, so the concept of a variable is given a 20 page explanation whereas the syntax of the more complex commands is glossed over in a 'do this and it works, you probably don't need to mess with it' manner.
Same problem (Score:4, Insightful)
There were a few options that I rejected:
At the risk of posting flamebait, do you really have to worry about the possibility of end users running a non-MS operating system? Almost certainly not. Even the few that use Macs can presumably view VML. So go with VML and mandate the use of IE.
Unless, of course, you do wish to use Flash and have the expertise - although I still think you'll run into issues of people not having installed the plugin.
Re:Why not an imagemap? (Score:2, Insightful)
Sir, you surely jest. Have you even considered the latency issues of a dynamic interface that requires an HTTP request every time something needs to be redrawn? Even on a gigabit network, with less than 6' of cable physically separating your client from the server it would be intolerable.
You may as well say that Javascript should never be used as it can't do anything that can't be accomplished server-side.
Comment removed (Score:2, Insightful)
Re:IE5...not quite (Score:3, Insightful)
Re:Same problem (Score:3, Insightful)
FYI, IE for Mac is a discontinued product.
There's really little point in writing a Windows-only web site. I mean, if you're not going to be multi-platform, why hobble yourself with the web in the first place? A real Win32 app will be much easier for everybody.
That he wants a web-based product is a good hint he wants multi-platform.
To add some signal to the noise, I'm facing the same issue, and generating Flash from Perl is the approach I'm planning to investigate first.
Agony of Expectation (Score:3, Insightful)
SVG to Mozilla
A solid reliable freely-redistributable implementation of SVG, and in Mozilla, would be one of the finest things, IMNHO.
A really good SVG implementation could make give web documents the elevated precision of presentation, akin to PDF, but in a W3C standard.
With extensions such as MathML and dynamic SVG, the format could form the basis of not just web documents, but paper documents (eg, stuff that currently is done in Word, Quark, Framemaker, TeX), as well as dynamic presentations (eg, Powerpoint) and, simple interactive applications that are currently done in text boxes in JavaScript.
Once a freely-available SVG renderer is available, then editing and composition tools for SVG documents should really take off. BTW, I don't count Adobe's SVG viewer because it is restricted to only a handful of platforms and no source is provided.
From what little I understand, the Mozilla SVG effort has been a one man show and entangled in licensing clauses.
It would be really nice if this were all cleared up and a big push into SVG by the Mozilla team were made.