Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Graphics Software

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?"
This discussion has been archived. No new comments can be posted.

Drawing Graphs on Your Browser?

Comments Filter:
  • by TC (WC) ( 459050 ) on Tuesday July 22, 2003 @04:46AM (#6497456) Journal
    If you can get away with just bar charts, take several gifs/jpegs/pngs that are just single colour pixels and have your server-side program fiddle with the heights and widths to draw your bar chart without having the server generate an actual image file.
  • IE5...not quite (Score:5, Insightful)

    by X-wes ( 629917 ) on Tuesday July 22, 2003 @04:51AM (#6497470)

    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).

  • by DrSkwid ( 118965 ) on Tuesday July 22, 2003 @05:02AM (#6497504) Journal
    As we need some interactivity, the GIF image generated on the server-side is not an option.

    Surely an image with an onClick and some Javascript will do what you ask of it?

  • Re:IE5...not quite (Score:2, Insightful)

    by Anonymous Coward on Tuesday July 22, 2003 @05:09AM (#6497520)
    IE5+ has too limited an audience to bother with, but Mozilla with SVG is worth the effort?!

    You sir, are incapable of consistant thought.

    You monkey.
  • by lpontiac ( 173839 ) on Tuesday July 22, 2003 @05:28AM (#6497578)
    .. and that interactivity is hard to achieve in a web browser, maybe this application doesn't belong in a web browser. Just a hunch.
  • by Andy_R ( 114137 ) on Tuesday July 22, 2003 @05:37AM (#6497600) Homepage Journal
    I've been pleasantly surprised by Flash MX, actionscript is a fully featured programming language that runs across all the platforms Flash is ported to. You can pass variables from your html page, so your graphing application should be writable as 1 single 'movie' that accepts data, rather than writing a new one every time you need to draw a graph.

    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)

    by gazbo ( 517111 ) on Tuesday July 22, 2003 @07:03AM (#6497814)
    We're doing a similar type of thing, but not specifically graphs - arbitrary vector graphics are required, and client side is most definitely required. The route I went with was VML.

    There were a few options that I rejected:

    • Flash - probably extremely good at this sort of thing, as vector graphics and user interaction are its big target. However, we have no in-house expertise, and the end-users will all be professionals who may very well not have Flash installed (and furthermore, their firewall may not even give them HTTP access to download it)
    • SVG - Great! It's W3C approved, as opposed to the officially deprecated VML! Whoop-de-fucking-doo. When our clients complain that our application doesn't work, I'll point them to the W3C spec and have the warm glow of righteousness as all of the lawyers' letters demanding refunds come in.
    • Java - Well, it can handle drawing and events just fine, we have in-house expertise, but the whole point we're doing this through the browser is to avoid having to write an application from scratch in the first place. Now calling it an "applet" and changing main() to start() doesn't alter the fact that IMO writing user interfaces in Java sucks my grandma's clit.
    So, VML. We have the luxury of knowing that the standard desktop is Windows running IE. I suspect that at least 95% of your target desktops (you did say enterprise, right?) will be IE too. Furthermore, if they're running Windows then you know that even if they are running, say Mozilla, that they have IE to hand.

    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.

  • by gazbo ( 517111 ) on Tuesday July 22, 2003 @07:09AM (#6497831)
    HAHAHA!

    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)

    by account_deleted ( 4530225 ) on Tuesday July 22, 2003 @09:05AM (#6498356)
    Comment removed based on user account deletion
  • Re:IE5...not quite (Score:3, Insightful)

    by aridhol ( 112307 ) <ka_lac@hotmail.com> on Tuesday July 22, 2003 @11:40AM (#6499817) Homepage Journal
    The original post also said that plug-ins were inconvenient.
    However, the article mentioned Flash and Java, both of which require plugins.
  • Re:Same problem (Score:3, Insightful)

    by bill_mcgonigle ( 4333 ) on Tuesday July 22, 2003 @11:58AM (#6500042) Homepage Journal
    Even the few that use Macs can presumably view VML. So go with VML and mandate the use of IE.

    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.
  • by 4of12 ( 97621 ) on Tuesday July 22, 2003 @11:59AM (#6500044) Homepage Journal

    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.

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...