Slashdot Mirror


Drawing Graphs on Your Browser?

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?"

201 comments

  1. Do you need all chart types, or just one? by TC+(WC) · · Score: 4, Insightful

    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.

    1. Re:Do you need all chart types, or just one? by Anonymous Coward · · Score: 0

      Informative, or just plain illiterate?

      Different graph types are mentioned in the bloody post, you cave monkey.

    2. Re:Do you need all chart types, or just one? by Anonymous Coward · · Score: 0

      Let's re-read the very first sentence of the request, shall we?

      I recently had a look at various ways to draw a graph (lines, bar chart, pie chart...)

      Yep, sounds like bar charts alone will do the trick for this guy. Also, those single-color gifs are very interactive. Way to hustle for that first post though!!

    3. Re:Do you need all chart types, or just one? by Tablizer · · Score: 1

      Also, those single-color gifs are very interactive.

      Who says they have to be a single color? Use color X for bar A, color Y for bar B, etc.

    4. Re:Do you need all chart types, or just one? by Anonymous Coward · · Score: 0

      he just said the gifs were single color, he never said you would just be using one.

    5. Re:Do you need all chart types, or just one? by IshanCaspian · · Score: 1

      That is a dirty, ugly hack. No excuses.

      Doesn't PHP have features for image generation on the fly? I bet with a combination of javascript, preloading, and PHP you could give the illusion of interactivity without resorting to dumb hacks.

      --

      But there is another kind of evil that we must fear most... and that is the indifference of good men.
    6. Re:Do you need all chart types, or just one? by TC+(WC) · · Score: 1

      How is it in any way dirty? It's remarkably elegant... It takes an insanely small amount of overhead on both the server and client machines and it doesn't break any standards...

    7. Re:Do you need all chart types, or just one? by TC+(WC) · · Score: 1

      In fact, I specifically mentioned using several.

    8. Re:Do you need all chart types, or just one? by djcapelis · · Score: 1

      you might as well just draw it in tables then... anyone else thinking GIMP's HTML image export is a sweet tech?

      --
      I touch computers in naughty places
    9. Re:Do you need all chart types, or just one? by gregfortune · · Score: 1

      Yes, PHP can generate images on the fly. See http://us3.php.net/manual/en/ref.image.php.

      Although this will work, it's probably not as "interactive" as the poster needs. Ie, a page refresh every time something needs to change is annoying.

  2. IE5...not quite by X-wes · · 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).

    1. Re:IE5...not quite by Anonymous Coward · · Score: 2, Insightful

      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.

    2. Re:IE5...not quite by rmohr02 · · Score: 3

      I would simply go with SVG. The first time I saw an SVG graphic on a webpage I was asked to download a viewer, and 30 seconds later I saw the image. That's not a real inconvenience.

    3. Re:IE5...not quite by syrinx · · Score: 2, Insightful

      IE5+ has too limited an audience to bother with, but Mozilla with SVG is worth the effort?!

      You sir, are incapable of consistant thought.


      And you seem to be incapable of any thought at all.

      Maybe you need this spoon fed to you.

      VML = only on IE5+

      SVG = on any browser with a plugin.

      Let's try that one again, just in case your brain hasn't quite wrapped itself around it.

      VML = not everyone.

      SVG = everyone.

      Get it yet?

      And I'd call *you* a monkey now, but that'd be an insult to many intelligent monkeys out there.

      --
      Quidquid latine dictum sit, altum sonatur.
    4. Re:IE5...not quite by aridhol · · Score: 2, Insightful
      The original post also said that plug-ins were inconvenient.
      However, the article mentioned Flash and Java, both of which require plugins.
      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
    5. Re:IE5...not quite by Anonymous Coward · · Score: 0

      It also basically discarded both of them. Will you please learn to read you wadge of dirty, monkey sputum.

    6. Re:IE5...not quite by Lordrashmi · · Score: 1

      SVG is in no way "everyone". It runs poorly in IE, and very poorly in netscape. They are just now starting to get SVG working at all in Mozilla, and I doubt it supports a lot of advanced scripting.

      I hate applets, but if you need alot of client side interactivity, I would say Java is the way to go.

    7. Re:IE5...not quite by EdMack · · Score: 1

      I don't see how flash is overkill.. yes it is proprietory, but you can always make the swf using php like so: http://www.phpbuilder.com/columns/mattern20010111. php3 Anyway, here's a simple graphing example I did the other week in Flash: http://www.koyote.dk/flash_files/sin_cos_tan_graph s.swf

      --
      puts ("Python r0cks\n");
    8. Re:IE5...not quite by Pieroxy · · Score: 1

      Maybe VML is good enough for now and when SVG will come along (read: wide native support or plugin deployed), we can move to it smoothly, since it is kind of a superset of VML.

      I agree with the Linux part, but do you think Linux is any threat on the short term to Windows on the Desktop of enterprise networks ? I'm not so sure.

    9. Re:IE5...not quite by marktwen0 · · Score: 1

      Just tried this myself (W2K/Moz1.4)--no go. The plugin installer runs, but doesn't appear in Moz and the sample images remain unrendered. Poo.

    10. Re:IE5...not quite by rmohr02 · · Score: 2, Funny

      This was about a year ago when I was still using IE (uggh). Anyway, Mozilla will probably have native SVG support by 1.5.

    11. Re:IE5...not quite by DancingSword · · Score: 1

      an SVG graphic on a webpage I was asked to download a viewer, and 30 seconds later I saw the image. That's not a real inconvenience.

      You weren't browsing the web via a braille-interface.

      Nothing like making the world block, more-entirely, ones already blocked by circumstance from participating...

      exclusive, rather than inclusive, humanity...

      sometimes it's necessary, but...
      sometimes it isn't.

      why not an alt-version, using -pre- tags, and text-graphs, for display of information?

      ... if eyeball-blind people are worth enough to include?

      Try some of these:
      The WWW Consortium's accessibility checklist, and Jakob Nielsen's bi-veekly Alertbox: current issues in Web Usability.

      --
      Messages to/for me ( in me journal )
  3. I can answer the last two by Kris_J · · Score: 3, Informative
    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?
    1) Require, no. Use for added functionality (interactive vs non-interactive) yes.
    2) No. If it doesn't work on (at least) Netscape/Mozilla then you're excluding too many people (unless you know something about your target audience that I don't).

    Surely you can do something with DHTML/Javascript to dynamically resize bar charts...

    1. Re:I can answer the last two by stoborrobots · · Score: 1

      Interesting idea...

      Especially since Netscape *invented* JavaScript...

      Just because other systems now include a similar language (with another name!!!) doesn't mean that Netscape does not understand it.

    2. Re:I can answer the last two by Anonymous Coward · · Score: 0

      Invented it or not, theirs is still a crappy implementation.

      That's not an 'idea' it's a 'fact of life'.

      xxx

  4. ImageMagick by darkov · · Score: 1

    Use ImageMagick (http://www.imagemagick.org/) and do it all server side and save your self a lot of user dissatisfaction. The chances of finding a format that everyone will see is pretty much nil. Just send them GIFs or JPEGs from the server.

    1. Re:ImageMagick by Sesse · · Score: 1

      Or perhaps PNGs? :-) /* Steinar */

      --
      (This comment is of course GPLed.)
    2. Re:ImageMagick by AssFace · · Score: 1

      he says that he needs interactivity and therefore that won't work

      --

      There are some odd things afoot now, in the Villa Straylight.
    3. Re:ImageMagick by Anonymous Coward · · Score: 0

      Well, since the GIF patent has expired...no need to promote PNG's anymore....

    4. Re:ImageMagick by darkov · · Score: 1

      Yes, I did notice that after I posted, but if he doesn't want to use Flash he'll have limited support, unless he insists that everybody install SVG.

      He didn't actually say what sort of interactivity he wanted, but if it's anything more complex than that can be delivered using JavaScript, then he'll most probably be going back to a server for data, which makes his requirement for no server-side a bit meaningless.

    5. Re:ImageMagick by Sesse · · Score: 1

      Well, PNGs still are technically far superior to GIFs, you know... No need to support a five year old legacy format anymore; everybody supports (non-transparent) PNGs nowadays. (Graphs rarely need transparency :-) )

      --
      (This comment is of course GPLed.)
    6. Re:ImageMagick by stonecypher · · Score: 1

      The guy expressly noted that, as it has to be interactive, static images are not an option.

      --
      StoneCypher is Full of BS
  5. JPGraph and PHP by FruitCak · · Score: 5, Informative

    I've recently had to do something very similar, well okay almost identical. Interactive graphs of various types and of various data sets from a Web Based interface.

    We have larges amounts of data which is very hard to interperate by a human in something like a spreadsheet. The only really feasable way to do it was graphs. Of course with the amount of data we had transmitting it to the client to do client side rendering (ie Java) is also out of the question.

    In the end we settled on JPGraph with an interactive interface built using PHP. So a wizard style interface to choose the type of graph, what data to graph, how to group the data, and finally the outputted graph with the option to change all the settings.

    With good indexed data making PHP generated graphs with JPGraph interactive is quite painless and very powerful.

    Just one suggestion, make sure you have a way for people to save the settings of the graphs they make so they can pull em later, keeps the PHBs happy :)

    --
    I'm me. I think.
  6. Client-side or server-side interactivity? by stoborrobots · · Score: 2, Interesting
    Do you need client-side interactivity (vis-a-vis an applet), or do you need a "dynamic image" (as used by most sharemarket websites, for example)?

    For serverside interactivity, a generated image (PNG,JPG,GIF) is more than suitable...

    You can even make it an imagemap, if you need image-based feedback...

    Just a thought...

    1. Re:Client-side or server-side interactivity? by Froggie · · Score: 2, Interesting
      On a slightly off-topic note, has anyone found a decent server-side graph generator? GD seems to be a bit pants, and almost none of them understand antialising...


      One option might be to find a server-side SVG renderer. Assuming you believe SVG will become an implemented standard (practically speaking, that means something that IE will eventually support) you could generate graphs in SVG, server-side render them for the time being, and have a relatively easy way of stepping forward to a SVG + JavaScript/DOM page in the future.


      Otherwise, if you want really clever ways of altering the graph's values or view that work today, you're going to have to use either Flash or Java.

  7. Why not an imagemap? by DrSkwid · · Score: 2, Insightful

    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?

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:Why not an imagemap? by Anonymous Coward · · Score: 0

      Huh? How on earth do you propose manipulating a bitmap image with "some Javascript"? He's talking about altering the proportions in pie charts and stuff.

    2. Re:Why not an imagemap? by Froggie · · Score: 2, Interesting
      How on earth do you propose manipulating a bitmap image with "some Javascript"?

      By fetching another image when a change is requested, perhaps? This is easy enough to do without a page reload.

    3. Re:Why not an imagemap? by gazbo · · Score: 2, Insightful
      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.

    4. Re:Why not an imagemap? by Froggie · · Score: 1
      You seem to have a very low opinion of my intelligence. Perhaps instead you should have thought about what I was suggesting before replying. I'm not suggesting that you redraw the image on the server with every mouse movement, which seems to be what you're thinking of.

      Javascript can't alter images, but it can make it moderately simple to e.g. pick a zoom area (downbutton marks a point, dragging draws a box in another layer so that the user can see what they're doing, upbutton sends the request with the co-ordinates gleaned). The responsive graphical part of this is client-side, and the relatively infrequent graph redraw is server-side.

      I'm sure, with a little imagination, you could come up with a range of operations that you could perform in a similar manner - possibly even as far as e.g. changing bar sizes, if you were prepared to put the time into writing the Javascript. Although in my experience more than a minimum amount of JS brings enormous cross-browser maintenance and browser crashiness problems...

      There are also more basic applications of the same idea, where you use an image which you occasionally reload and a set of form elements that change the graph parameters. So, when someone changes the graph from a bar to a line, only the image, and not the whole page, is redrawn. If you look around enough share-price-graphing websites, you should find a few examples of this.

    5. Re:Why not an imagemap? by gazbo · · Score: 1
      OK, a hybrid solution may be acceptable depending on exactly what he wants (as in a visual clue, such as rubber-banding, drawn by Javascript, then the finished operation rendered by the server) but I think that it would be tricky to generalise this to all of the possible operations he may want.

      For example, you are basically limited to drawing a rectangle. You could specialise this to only allowing a horizontal line, or a vertical line, but ultimately that's all you can get without running back into the very problem he's trying to solve.

      OK, I'll apologise for being harsh (well, 99% of my slashdot contributions are trolls, and it's hard to flick out of character) but one of the common problems with "ask Slashdot" questions is that unless it is highly technical to start with, everyone is willing to chime in with irrelevant, dumb and downright wrong answers. And the entry bar doesn't get much lower than talking about web pages (read some of the "helpful" comments in this story about useful server-side graph utilities, for example) so I figured you'd just not thought it through.

      So there we go: an official gazpology - cherish it, for it is a rare and wonderous thing indeed.

    6. Re:Why not an imagemap? by Froggie · · Score: 1

      Wow, apologies on Slashdot. The end of the world is nigh. ;-)

    7. Re:Why not an imagemap? by Pieroxy · · Score: 1

      The idea is that the more interactive the better. GIF/PNG generation on the server side is not that interactive, that's why we were looking at other possibilities.

  8. Re:Premptive Strike at IE zealots by Anonymous Coward · · Score: 0

    well in my experience i can create great interactive STANDARDS COMPLIANT sites that work completly in Opera, Mozilla and Safari, then have to go bugger it up to get it working in IE

  9. Hijack Excel by floydigus · · Score: 0

    This may not be ideal for you, and its a bit of a kludge, but others might find it interesting...
    It's relatively trivial to use VBA to get Excel to generate a nifty graph. Now use the 'save as html' format and it will save a nifty gif of the graph. I have written a wrapper for this process which means I can pass in a dataset and end up with a reference to the graph file.

    --

    All things in moderation; including moderation

    1. Re:Hijack Excel by __aafkqj3628 · · Score: 0

      That not only requires a nice big plugin download (that bitch ain't small), but it's also ActiveX and IE only.

    2. Re:Hijack Excel by floydigus · · Score: 1

      Without trying to sound rude: Bollocks. Try reading the posts before replying to them.

      --

      All things in moderation; including moderation

    3. Re:Hijack Excel by __aafkqj3628 · · Score: 1

      I did, but I just realised that you meant save as html (which is different from save as web page).

    4. Re:Hijack Excel by Anonymous Coward · · Score: 0

      This won't work if the data is live -- Excel is a big pig singlethreaded process that doesn't run well on the web server.

      And even though you aren't talking specifically about the "web components" -- steer away from them too. They suck.

    5. Re:Hijack Excel by Pieroxy · · Score: 1

      That's a nice one but two problems over there:
      1. That bounds us to IE since the "Save As" feature generates a very IE oriented output (even though it might work ugly on Netscape)
      2. Then, why not using VML ? More flexible, lightweight, it's even a w3c standard

    6. Re:Hijack Excel by floydigus · · Score: 1

      1. Bollocks. My technique uses Excel to generate a *gif* file which can then be included in a web page for viewing in any browser.

      2. Irrelevant, given 1.

      --

      All things in moderation; including moderation

    7. Re:Hijack Excel by floydigus · · Score: 1

      At last, some valid criticism!

      I agree with you about the "big pig singlethreaded" thing, but that doesn't *actually* mean it won't work: provided you have a beefy enough server, I'm not aware of any reason why Excel can't run on it.

      Even so, personally I would use this technique for pages that are updated periodically rather than on the fly.

      --

      All things in moderation; including moderation

    8. Re:Hijack Excel by Pieroxy · · Score: 1

      Well, then I would just ask you to read the story once (or twice) again. Here is the relevant line:

      "As we need some interactivity, the GIF image generated on the server-side is not an option"

    9. Re:Hijack Excel by floydigus · · Score: 1

      Allow me to quote myself...

      This may not be ideal for you, and its a bit of a kludge, but others might find it interesting...

      I rest my case.

      --

      All things in moderation; including moderation

    10. Re:Hijack Excel by Hognoxious · · Score: 1
      provided you have a beefy enough server, I'm not aware of any reason why Excel can't run on it.
      So Excel runs on Linux?
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    11. Re:Hijack Excel by floydigus · · Score: 1

      I don't claim to be an expert, but yes, I believe there are ways. Thanks for your contribution.

      --

      All things in moderation; including moderation

    12. Re:Hijack Excel by Hognoxious · · Score: 1
      I don't claim to be an expert
      You got something right.

      Allegedly it does run under wine, though I'd be very surprised if it works well, and with all the exotic & fancy stuff.

      The point (that you missed totally) is that people who run MS on a server are grade-A nonces.

      Thanks for your contribution.
      Same to you and the horse you rode in on, fartknocker.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    13. Re:Hijack Excel by floydigus · · Score: 1

      Are you having trouble at home, dear? You seem very agitated.

      --

      All things in moderation; including moderation

  10. dumb question by Anonymous Coward · · Score: 0

    Is IE5+ a wide enough target for an enterprise application?"

    sorry for trolling, but that sounds like a dumb question.
    no matter how much this site hate micro$oft, we still have to accept the fact that window$ still dominate the market.
    at least 8 out of 10 of my randomly picked friends are using windows.

    1. Re:dumb question by Anonymous Coward · · Score: 0

      Well done you, for being correct.

      Alas, I expect some flamage to follow.

      Probably along the lines of "IE isn't standards complient, blah blah blah" completely ignoring the fact that it is the VML part that fails to work in their browser of choice, and this is a W3C defined standard not a MS one.

    2. Re:dumb question by erinacht · · Score: 1

      dumb is the wrong disability - blind (having no vision) is probably a better.
      The thing about WEB STANDARDS is that the latest MS browser is really rather compliant - after all Microsoft are a major player in the creation of these standards.
      Coding web pages for standards compliance INCLUDES Internet Explorer which will render reliably and faster when in standard compliant mode.
      Quirks mode is used for junk HTML markup to make sure that badly written web pages will still work, but this mode may well be dropped some future Microsoft World Wide Web Reader Application.

      The point of the standards is nothing to do with market share, linux, mac or anything else, it's about making sure that the pages produced will work today with the minimum of effort on the part of the author AND that these pages will continue to work into the future WITHOUT changes.
      Do you get it?? It doesn't matter which browser you use - you'll use a different one in the future.

    3. Re:dumb question by Anonymous Coward · · Score: 0

      >> It doesn't matter which browser you use - you'll use a different one in the future.

      Not if you use IE, and avoid taking stupid pills.

    4. Re:dumb question by Phillup · · Score: 1

      Well... Windows may still dominate "the market"... but, an "enterprise" and a "market" are totally different beasts.

      I'm currently working on an "enterprise application" and the target browser is Mozilla 1.2 .

      Why?

      Because with three flavors of Win95... and Win98... and WinMe... and W2k... and Win eXPerimental... and let's not forget the many versions of MacOS running all over the place...

      Well... Mozilla was the only browser that would run (consistently enough) on them all.

      And... it doesn't insist that we upgrade our operating system and upgrade our applications to work on the upgraded operating system... just to run a newer browser.

      Oh yeah... the "enterprise" is a school district where we insist on:

      1) A high return of investment for our software... just as our hardware. Constantly "upgrading" reduces ROI.

      2) Teaching computers... not "Windows"

      And don't kid yourself that this is happening just in schools. Many businessess consider IT to be a cost factor and are not convinced that the cash register will count money any better if they upgrade to the latest OS.

      With many versions of Windows in your business... IE becomes less of an option because of MS "integration". What business wants is a browser that works... on *ALL* of its computers!

      P.S. The application is for administrative & teacher use. But, we can't afford computers for the sole use of the teacher... we can't "standardize" the platform. That *would* change the equation.

      So, the teachers use what is in the classroom... and that means we have to reach a very wide audience... and that means IE, for all of its "market share" is not an option.

      --

      --Phillip

      Can you say BIRTH TAX
    5. Re:dumb question by Anonymous Coward · · Score: 0
      IE isn't standards complient, blah blah blah

      Neither is your writing.

    6. Re:dumb question by erinacht · · Score: 1

      >>>> It doesn't matter which browser you use - you'll use a different one in the future.

      >>Not if you use IE, and avoid taking stupid pills.

      Perhaps you're not aware of that microsoft has stopped creating new versions of IE. To get the next browser upgrade you'll need to buy a new operating system - top marks MS!

      Happy with your current browser now?

      Of course, perhaps you like stealing software unlike the majority here...

    7. Re:dumb question by Pieroxy · · Score: 1

      Well, I don't think you're right on this one. IE will be bundled with the OS, granted, but that doesn't mean you will not be able to install IE7 with WindowsXP. It just does mean it will be part of a service pack or another type of upgrade.

    8. Re:dumb question by Anonymous Coward · · Score: 0

      As slashdot is largely populated by Americans, I think we can safely disregard any chance of 'standard' English ever being used. And if you can't beat them, you may as well join them.

    9. Re:dumb question by the_greywolf · · Score: 1

      that's not what Microsoft announced a while back. this article talks about it a bit.

      --
      grey wolf
      LET FORTRAN DIE!
  11. SVG + alternatives by khanyisa · · Score: 1

    Facing the same question, we are taking a route where people can have either SVG (if they have a plugin) or a standard image format. Then server side we render the chart onto the required format. SVG is really nice - compact (if compressed), simple, scalable, ability to have dynamic interaction etc. but PNG etc are good to have as fallbacks...

  12. If it's meant to be this interactive.. by lpontiac · · Score: 4, Insightful

    .. and that interactivity is hard to achieve in a web browser, maybe this application doesn't belong in a web browser. Just a hunch.

    1. Re:If it's meant to be this interactive.. by stoborrobots · · Score: 1

      Agreed... It is not useful to webify every single application...

      Some apps are just better off as applications than webapps.

      Consider whether the webapp route is really worthwhile in this case. If it is, then you may have to sacrifice interactivity (a little). If it isn't, then use a conventional application, and deploy it...

      Just my $0.02

    2. Re:If it's meant to be this interactive.. by Pieroxy · · Score: 1

      It does exist and is achievable in a web browser. The question is more about "What's the state of the art today ?", or "What's the best alternative for our App ?"

    3. Re:If it's meant to be this interactive.. by vadim_t · · Score: 1

      Pfft. It's definitely not going to be "state of the art". It will be a poor and laggy immitation of what you could have done with a proper GUI. I've seen no web interface that was better than a program running locally.

      For example, compare phpmyadmin and any other GUI mySQL database tool. phpmyadmin is slow and annoying to use in comparison with pretty much anything else. It does have its uses, like letting people admin their database without opening the port to the whole internet, but if I can use any other tool I will take it over phpmyadmin.

    4. Re:If it's meant to be this interactive.. by Pieroxy · · Score: 1

      More offtopic is really a challenge after this one!

      Anyways, I'll try to explain the problematic of the web-based applications: No deployment.

      Cost of developping an HTML page running on Linux/Mac/Windows/IE/NS/Opera: 1 day
      Cost of developping a proprietary app running on all that (only showing the page in question, with let's say a little form): 2 weeks

      Don't forget the Cost of development includ QA.

      See, native programs are not always the answer.

    5. Re:If it's meant to be this interactive.. by vadim_t · · Score: 1

      Well, you said it was an enterprise application. I doubt you have Linux, Mac and Windows desktops there all at once. Depends on what you use to develop too. As much as I hate it, it's possible to produce quite nice looking stuff with VB pretty fast. There's also Delphi/Kylix which has the advantage of running on both Windows and Linux. Qt looks nice as well and supports all 3 platforms.

      Deployment is not that hard to automate. Take NSIS or some other installer, make it ask no questions, and make your app check the latest version on startup, and run the installer from the network if needed.

    6. Re:If it's meant to be this interactive.. by lpontiac · · Score: 1
      Anyways, I'll try to explain the problematic of the web-based applications: No deployment.

      If you're an enterprise, you already have a remote deployment solution (Ghost images, Ghost packages, Microsoft's SMS packages) or you should do - how do you deploy fresh installations and updates to local applications like your office suite, web browser, email program etc?

    7. Re:If it's meant to be this interactive.. by Pieroxy · · Score: 1

      Well, that would stand true if my company wanted to deploy an enterprise solution for itself, not if it tried to sell it to others.

    8. Re:If it's meant to be this interactive.. by gregfortune · · Score: 1

      Use Qt and you'll be up and running on all three platforms in a couple hours...

  13. How closed is SWF really? by Burb · · Score: 3, Informative
    The SWF format is pretty open, as these things go. The FLA format used by flash is proprietary, but SWF documented and that's the bit that actually get's published on the page.

    The MING library can generate SWF from PHP et. al.

    --

    1. Re:How closed is SWF really? by jaredcat · · Score: 1

      OpenSWF.org

      "OpenSWF.org is the source for information on the Flash File Format. Here you will find file format specifications, sample code, links to 3rd party tools and more.

      SWF is the file format used by Macromedia Flash to deliver graphics, animation and sound over the Internet. Almost 95% of web users can view SWF content without having to install a new plug-in, and over 300 million people have downloaded the Flash player. Macromedia published the specifications for SWF in April 1998. This site has resources for programmers who want to read, write or play SWF files."

  14. Flash isn't as bad as it used to be by Andy_R · · Score: 3, Insightful

    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.

    --
    A pizza of radius z and thickness a has a volume of pi z z a
    1. Re:Flash isn't as bad as it used to be by AssFace · · Score: 1

      Flash has been able to do that for a few versions now.

      Flash is moving more and more towards what Shockwave used to be.
      Flash doesn't support OpenGL or anything the way Shockwave does, but it is a very good tool for certain things - making dynamic/interactive graphs is certainly one of the things that it is good for.

      --

      There are some odd things afoot now, in the Villa Straylight.
  15. Have you considered TABLE by Burb · · Score: 2, Informative

    For simple histograms, you can go quite a long way with TABLE TD and TR, and a few 1x1 coloured GIF files stretched to suit. Primitive perhaps but very portable to most browsers. OK, lynx users will get cross ... maybe generate ASCII art for them

    --

    1. Re:Have you considered TABLE by Pieroxy · · Score: 1

      Do I need to mention that Lynx is not our target ? ;-)

      Histograms works the way you describe, that is true, but other things needs to cooperate on the same graph as well...

      Point taken: DHTML might be a reasonnable fallback.

  16. Java might be faster than you think by dhk42 · · Score: 3, Informative

    If you want the interactivity, you should at least try an optimized pared down applet. It's true that most applets are slow, but it is frequently also true that they are written badly and/or contain heaps of additional libraries that they need to download. Use as much of java's built-in code as you can with the possible exception of the GUI library.

    Look at lightweight graphical libraries like lwvcl (commercial) or thinlet (LGPL) for the controls. The zaval people even have a charting library for their lwvcl system. (I have never used the lwvcl library, it just looks cool - try their online demo. Thinlet packs amazing capabilities into a very small package.)

    If you need to display 15 graphs at a time with limited interaction, then this may not be the way to go, but if you need to display one at a time with very rich interaction, this might be the ticket.

    dhk

    1. Re:Java might be faster than you think by Anonymous Coward · · Score: 0

      If you are OK with non-free software, you might also want to check out Oracle's BI Beans. They are pretty powerful and will let you build many different kinds of charts and graphs - even interactive ones.

    2. Re:Java might be faster than you think by Pieroxy · · Score: 1

      Java Applets are not slow per se, but the Java plugin is a pain to start. On a laptop a little busy, it can take somewhere around 10 seconds...

      Plus, the first time I clicked on the links, it froze my browser. Granted, some other applets running might have been introducing some crappy threads in there, but welcome to the real world. If we use Java, we share the same JVM with any other Applets our end-user is viewing, and if one gets a dead-lock with the GUI thread, we're also dead.

    3. Re:Java might be faster than you think by dhk42 · · Score: 1

      10 Seconds? Sheesh, what version of the plugin are you running?

      But no matter. I still claim that in practice (for most people it will not be 10 seconds) this is generally no longer than your average user is going to wait for your average web-app page load unless you have a wicked fast network and it will only take that long the very first time an applet is loaded, so you could even force this loading to occur ahead of time in a multi-page scenario.

      Dead-locks in applets are at most as common as multi-threaded applets, which almost don't exist. I am not saying that one can't freeze the VM, I am just saying that it's more likely to be an endless loop of some kind than thread dead-lock per se.

      So you do have a point about sharing the JVM, though I have never actally seen my browser VM freeze that I can recall.

      If I can't convince you to try applets, then how about web start? If you truly want interactivity, then just add a "click here for interactive graph" link that starts a genuine rich client application. This WOULD require your users to install a modern JVM (the applet route would not), but now there isn't anything you can't do.

      dhk

    4. Re:Java might be faster than you think by Pieroxy · · Score: 1

      10 seconds is common if your computer is a little bloated (IE: out of memory). Very common in fact.

      You can;t preload the plugin since it freezes everything since it is started. It does not start gracefully at all...

  17. Java by Admiral+Burrito · · Score: 1
    Java is very flexible but slow (to start and run).

    A while back I created a small Java applet that did some minor client-side image mangling. There was a delay of a fraction of a second bringing up the image. Not "slow" by any means. Most of that delay was probably the time it took to download the image from the server.

    The real problem is that you have to stick to what is available to the 1.1 runtime. Yes, that's "1.1" from the previous century, because that's what most Windows users have.

  18. We use Corda by pbulteel73 · · Score: 5, Informative
    Most of these posts suggested image formats... I have a suggestion for an application if you want charts.

    Corda might do what you need. It will output the images in Flash, JPG, PNG, GIF, SVG and others. I believe it uses XML files to generate the graphs. I'm sure I'm missing a lot of the other things that it can do, but it's worth taking a look. Oh, and unfortunately it's not free, but it might be worth it if it does what you need.

    Note: I do not work for this company. I have seen the results of using their product. We use it where I work and everyone seems to like what it can do.

    1. Re:We use Corda by pmz · · Score: 1

      Corda might do what you need. It will output the images in Flash, JPG, PNG, GIF, SVG and others. I believe it uses XML files to generate the graphs.

      With that many buzzwords, you can't go wrong! (everyone cheers) COR-DA! COR-DA! COR-DA! YAAAAYYYYY!

    2. Re:We use Corda by Pieroxy · · Score: 1

      See, I went to the link and it demonstrate exactly what we are trying to avoid. The live deom "2000 Presidential Election Results":

      Every single time you click anything, the screen reloads and it takes 3-4 seconds to get the new graph. The user experience behind this kind of figures is really bad, as I don't keep in my mind an idea of a nice graph even though the graph was nicely drawn, beautifully anti-aliased. But barely usable.

      Try out VML if you're not concerned by IE5 only limitations, and experience that with less download than one of your graphs (Same gore-bush example), you can have the same graph reacing instantly to your choices.

    3. Re:We use Corda by Hognoxious · · Score: 1
      I believe it uses XML files to generate the graphs.
      It must be good then.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  19. GD::Graph is quite popular, fast, and easy. by Anonymous Coward · · Score: 1, Interesting

    In perl.
    Blazing fast with mod_perl.
    Very easy to learn.
    More info here.

  20. Javascript by Basje · · Score: 3, Interesting

    I once wrote a piece of javascript that would do this client side. It was for a corporate intranet, so I knew which version of which browser was going to be used.

    The idea was simple: I created a table with every cell one pixel large, and set the colors accordingly to the input for the frame. It started out as a simple line graph, but in the end it could do bar and pies too.

    This should be doable crossbrowser now that JS has stabilized enough between IE and Moz. If implemented right, it can really do with much lower bandwidth than pictures (which was the main requirement then): the .js file can be cached, so only the data has to be sent, measuring a large multicolor pie graph in bytes rather Kbytes.

    --
    the pun is mightier than the sword
    1. Re:Javascript by Anonymous Coward · · Score: 0

      Erm... a /pie graph/ rendered using individual table cells? How on earth did you manage that without having thousands of pixel-sized table cells? sounds quite ridiculous imitating a proper bitmap in this way and bound to crash a lot of browsers on slower machines. Just think of the RAM and the processing overhead on rendering thousands of tiny table cell pixels. When you could just use a PNG.

  21. Expensive by Futurepower(R) · · Score: 1

    Yes, but it costs thousands of dollars!!!

    1. Re:Expensive by Zardoz44 · · Score: 1
      I recently had a look at various ways to draw a graph (lines, bar chart, pie chart...) for a web-based enterprise application.

      Thousands of dollars is par for the course when talking about enterprise applications. There was never any mention of cost limitations in the original article.

  22. Same problem by gazbo · · Score: 4, Insightful
    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.

    1. Re:Same problem by bill_mcgonigle · · Score: 2, Insightful

      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.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    2. Re:Same problem by gazbo · · Score: 1
      Ah, yes. Forgot about Mac/IE.

      And there is sense in writing web apps for specific environments. First, if you're providing it as a service for hundreds or thousands of people, then you have the ultimate thin client - zero rollout, just a URL. Also, no need to worry about server security or reconfiguring firewalls, as everything runs on Apache and port 80. Also, as with a similar project I'm doing, if you're mostly interested in showing a load of data, then a web browser is an ideal platform to do it in; HTML talking to your choice of mod_perl, mod_php, whatever is a really, really easy way of coding an attractive, multiuser interface to data.

      The cross-platform nature is just a neat bonus.

    3. Re:Same problem by cpeterso · · Score: 1


      Flash is on more computers than you may think. The Flash Player ActiveX Control is bundled with IE and Windows.

      Microsoft's DLL Help Database will tell you which versions of which DLLs shipped with which Microsoft products. Search for "swflash.ocx". Very helpful!

    4. Re:Same problem by Pieroxy · · Score: 1

      I don't have the .ocx mentionned. Since when is Flash bundled in the default install of IE ?

    5. Re:Same problem by cpeterso · · Score: 1

      The filename of Flash Player 1-5 was "swflash.ocx". Flash Player 6 was renamed to simply "flash.ocx" because Windows XP's file protection prevented the bundled Flash Player 5 swflash.dll from being overwritten by the Flash Player 6 downloaded from Macromedia.

      I found a much more helpful guide on Macromedia.com. Macromedia has more information about Flash Player bundling here: Macromedia Flash Player and Browser Matrix - bundling reference guide .

      Basically:

      Flash Player 6 is bundled with Netscape 7 and AOL 8

      Flash Player 5 is bundled with WinXP, IE 6.0, Netscape 4.79, and AOL 7

      Flash Player 4 is bundled with WinME, IE 5.5, Netscape 4.6, and AOL 6

      Flash Player 3 is bundled with Win98, IE 5.0, Netscape 4.06, and AOl 4

    6. Re:Same problem by Oddly_Drac · · Score: 1

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

      plus

      "So go with VML and mandate the use of IE."

      You might want to check when the Flash Plugin was _bundled_ with IE and Netscape, sparky. I take your comments on Flash, though, as it can be a bitch to integrate; (I'm a PHP Developer that left his IDE tools with Windows 3.11) although it's getting easier since the SWF format was opened.

      Note that you mention the w3C 'official' status of SVG against VML; SVG is 'more likely' to be supported in future browsers and extended to provide more functionality whereas VML will be likely killed when people no longer see a use for it, and this 'future-proofing' tends to be important to anyone that's tried to find a decently priced COBOL hacker.

      --
      Oddly Draconis
      Too cynical to live, too stubborn to die.
    7. Re:Same problem by gazbo · · Score: 1
      Yeah, someone else already pointed out that flash was bundled. As you may have guessed, the overriding reason was that we have no Flash experience (Also a PHP coder whose environment is a text editor).

      As for W3C ratification, I think you're being optimistic. Yes, it's nice to future proof things. However, SVG has been around for a couple of years, and is still not natively supported by IE. VML, however, is, and has been for some time. Even if (when) IE starts supporting SVG, there will be a significant time before VML is deprecated, then finally dropped. When that finally happens, the chances are the software will have undergone far more serious changes than switching the client side vector language.

      One other thing to remember is that even if the day comes that a switchover is needed, there is another major advantage of web applications: zero rollout in the company. Just patch the server, et voila! There is a trade-off between future proofing, cost, and present day usefulness. Now don't get me wrong, I can't wait until SVG becomes the de facto standard, as its language is so much cleaner than the oblique VML, but for the time being, I maintain that VML is a saner choice than SVG.

      Shit, if you really want to be safe, write the client side scripting through an abstraction layer so that when you need to you can switch to SVG, or Microsoft UltraVec 2007 or whatever, just by updating vectorlib.js.

    8. Re:Same problem by Oddly_Drac · · Score: 1

      Argh...I wasn't expecting a well-reasoned and thought out answer...

      "I think you're being optimistic"

      It's my father, he has a genetic predisposition to being optimistic. I tend to temper it with a healthy cynicism. The major problem with W3c ratification is that there's no requirement to build anything into a browser; given that MS have actually stated that they won't be developing IE6 further (even for compliance to W3c standards) and the general inertia of people using the things that's bundled with their OS. Expect more Microsoft HTML(tm) in the future.

      Seriously, though, there isn't necessarily that much of a curve with using something with a Flash flavour if you can find the right tools, and since the opening of SWF there have been a proliferation.

      Obviously you might be looking for a flat learning curve, but check out The Ming Pages and OpenSWF for a bit more information.

      It's important to note that I'm not a fan of Flash, per se, but in terms of market/desktop penetration for a vector format, it's the absolute daddy.

      --
      Oddly Draconis
      Too cynical to live, too stubborn to die.
  23. How about HTML and CSS? by DeadSea · · Score: 2, Informative
    Here's a mockup of a bargraph for a web site statistics package that I'm working on:

    http://ostermiller.org/bargraph.html

    It is done using only HTML with CSS. There was some reason that the bars come down from the top rather than up from the bottom, but I don't remember what it is right now...

    1. Re:How about HTML and CSS? by gazbo · · Score: 1
      OK, fine. And if you changed the height attribute using JS then I'm sure it would all work just nicely.

      Now write the equivalent for a line graph or a pie-chart and I'll give you a cookie ;-)

    2. Re:How about HTML and CSS? by DeadSea · · Score: 2, Interesting

      Pie chart would be hard. I'll bet you could do a line graph. I'm thinking that you could generate a large table with javascript. You could set each each of the cells to be 1px by 1px. Then turn on the backgrounds of the ones in the line. It'd be a bit of a cludge, but it just might work. (Come to think of it, pie chart might work like this too if you have enough time on your hands).

    3. Re:How about HTML and CSS? by gazbo · · Score: 3, Interesting
      Cute idea - time to dig up the rasterizing algorithm and port it to JS. Yeah, in principle it would work (might possibly be a problem trying to persuade the browser that no, really, I honestly do want these TDs and TRs all to be on adjacent pixels.


      I wonder how quickly a browser could re-flow a document that included an 800X600 cell table...My guess is "painfully", but it's almost worth writing the concept code to find out - time to write some PHP (I'm buggered if I'm going to write it by hand)

    4. Re:How about HTML and CSS? by TheShadow · · Score: 1

      Well, everyone has those 3.2Ghz Hyperthreaded processors now so it shouldn't be a big deal.

      --

      --
      "What do you want me to do? Whack a guy? Off a guy? Whack off a guy? Cause I'm married."
    5. Re:How about HTML and CSS? by Pieroxy · · Score: 2, Interesting

      I actually gave it a try... 'twas too long this idea was in my head, so I tried it....

      My PC is approx. 1GHz.

      320x20 (yes, 320x20 not 320x200) pixels takes approx 1 minute to be built through DHTML. (Using a table and a TD for every cell). Giving that 320x5 takes 4 seconds, it is not linear and we can deduce that a 320x200 matrix would be built in a couple of days.

      Hmm, we'll need more than Hyperthreading.

    6. Re:How about HTML and CSS? by gazbo · · Score: 1
      ...and throw in a rasterizing algorithm on top of it as well and we're in for some serious fun.

      Well, I'm glad you tried it out as otherwise I'd have been compelled to write the code myself. But your results do confirm my suspicions of the people who claimed that they'd done this before. I can only assume that they meant the idea had occurred to them before, but wanted to sound "cool" by claiming they'd implemented it. Whatever.

      My suggestion of VML stands.

    7. Re:How about HTML and CSS? by Pieroxy · · Score: 1

      Actually, I finally found the ultimate DHTML implementation for this concept: Check it out!

      Just a proof (if needed) that my poor little implementation sucks big time ;-)

      Still some performance issues, but really good stuff otherwise. And the fact that it does works in all browsers is invaluable!!!

      This does not replace VML in my mind, but complete it. I see it as a reasonnable fallback if we ever have to support browser != than IE5+. That just validate that the lightweight approach can be cross-browser.

      Let me know your thoughts on this one.

    8. Re:How about HTML and CSS? by gazbo · · Score: 1
      Yeah, I played with that one too - pretty impressive rasterizer to reduce the number of DHTML primitives to a minimum.

      I don't know exactly what your app does, but I guess that from what I assume a graphing interface would do, a <1 second delay is perfectly acceptable. It's a little slow for what I am working on, as it needs to be near-as-damnit realtime (think lines tracking mouse drags), but I'll certainly bear it in mind for any future projects that don't need to be quite as fast.

      The API is nice and simple too, so I guess it'd be relatively simple to write an abstraction layer for the functions - just include the VML or DHTML libraries depending on a server-side browser sniff. Let me know how it all works out - I'm kinda interested in this one.

  24. Oops, forgot to mention... by Anonymous Coward · · Score: 0

    You can dynamically call it with javascript.
    You can use an image map and some javascript.
    You can put results in a frame or an iframe if you don't want the entire page to reload.

    I wouldn't write the whole thing in javascript alone -- why reinvent the wheel?

  25. Is PDF even viable? by jolshefsky · · Score: 1
    Here's a couple ill-thought-out ideas:

    In considering possible solutions, I would take a crack at PDF. I've never done PostScript programming, but as I understand it, you can create vectors, arcs, and splines pretty well. Actually, since I don't have a good graph-generating package myself, I may just look into this ... hmm.

    For my own use I would also look into CAD software formats ... what was it, DXF? I gather that's pretty simple for vector stuff, but it's not readily supported in browsers.

    --
    --- Jason Olshefsky

    Karma: Poser (mostly affected by adding this line long after everyone else did)

  26. "Enterprise" by Muggins+the+Mad · · Score: 1


    I think it depends what you mean by "Enterprise application".

    If you mean this is for a company intranet or something where you can control the browser they're using, then having to install a plugin for SVG or Flash wouldn't seem to be a problem. Neither would dictating IE5+, although you might find that limits the companies options later.

    If you mean it to be "professional looking" for as many customers as you can, then obviously going IE only is about as short sighted as you can get (remember Mac users are about to be excluded) leaving you with probably 10-20% unable to use your application. Requiring a plugin might be a hassle but if it works on everyones browser choices then maybe that's still ok.

    But I don't understand why Java is the wrong answer here? Most people have it, it really isn't slow to start and run unless you're doing something boneheaded with it like sending many megabytes of libraries you don't need.

    You can even do some surprisingly powerful things with Javascript, although coding them to work in buggy browsers (all of them, especially IE) can be a real pain.

    - Muggins the Mad

  27. Accept: image/foobar by 42forty-two42 · · Score: 1

    Why not check the HTTP Accept header? If SVG's in there, use it. If VML's in there, use it. Etc.

  28. ThreeDGraphics by Zardoz44 · · Score: 1
    Since this hasn't been mentioned yet, you may want to look into these guys:
    Three D Graphics.
    As with many things, it all depends on what you need and how you use it. You can definitely get interactive web-based charts generated on the server side using their PGSDK, but it may be a more comprehensive (i.e., expensive) solution than you need. They support just about any chart type, including OpenGL rendered 3-Dimensional bars, complete with texturing, etc... Overkill for most, but it gives you an idea of what's possible. Plus they run on all platforms.

    (I don't work for them, but I have used their products)

  29. Why not... by kashmirzoso · · Score: 1

    If you can control the browser to be IE5+ and don't mind using a plugin, you could..... write a .NET control using the System.Drawing namespace. Very easy to use. I have done something similar where I generate .png files on the fly based on user input and a resulting DataSet. p.s. I will preceed to duck now, trying to avoid the flying tomatoes.

    1. Re:Why not... by Pieroxy · · Score: 1

      If you can control the browser to be IE5+

      Then VML would be the solution: Native support, no signing, no binary, lightweight XML-like language, JavaScript controlled through the DOM. Why in the world would we use anything else ?

    2. Re:Why not... by kashmirzoso · · Score: 1

      Yes, that would be a good option also.

  30. Ploticus by jedimaster101 · · Score: 2, Informative

    I rarely comment, but I can't help it here. I work for Wal-Mart, and I'm on a team that needed to be able to graph a system's performance (CPU/mem/network/disk usage, et cetera). Similar situation to what you're in, I think. I'm not sure what they were using beforehand, but everybody, managers included, is extremely happy that they've switched to Ploticus. They rave about how fast it generates a graph. It's very, very flexible. And it's open source; I noticed a subtle bug, and a few days after notifying the author he gave me a fix.

    We have the raw data points coming in from a server-side scripting language (proprietary, unfortunately). These points are passed to a Perl script which parses the data and stores it in a format Ploticus can recognize. It also generates the configuration file used by Ploticus.

    I'd really highly recommend Ploticus. No plugins needed. Once you figure it out, it's a dream.

    1. Re:Ploticus by Pieroxy · · Score: 1

      How is that interactive ? The whole point of the story is to ask for something interactive. If we have to generate images on the server side, number of libraries are out there to help us...

    2. Re:Ploticus by jedimaster101 · · Score: 1

      Sorry if I didn't explain this well. I was practically rushing out the door to work as I typed. ;-)

      I guess I don't understand why interaction implies "client-side". The interaction comes into play with simple HTML <form>'s. It's pretty straightforward, really. The user can still pick out the system, metric, and style of the chart, so there's the interaction right there.

      It would be different if your server was under a load and you wanted to push the computation out to the client. But for these constaints, I don't see why a server-side solution is unacceptable.

      Advertisement: for more info check out Ploticus' home page at <http://ploticus.sf.net/>.

    3. Re:Ploticus by Pieroxy · · Score: 1

      Interactivity on the client side is necessary for smoothness of the display.

      Deciding that I want to add a specific data set to my graph or that I want to see a histogram instead of a line plot has another dimension when you can actually do it instantly. The server-side roudtrip add an unnecessary perceived heavyweightness (should I say bloatiness) to the web app, even though architecturally, moving things to the client side is probably heavier.

  31. use flash by sarabob · · Score: 1

    Use flash - I don't know how you can dismiss it as overkill when you consider using java.

    If you just need the basics, you can use ming to generate the graphics, and most of the vector drawing programs will save as .swf

    You get cross platform support (pc, mac, linux, IE, opera, moz) and no plugin download for >80% of your audience. ECMAscript-like actionscript for interactivity, and a whole shedload of developers to help you when you get stuck.

    OK, so it's not quite OSS, but you *can* get the source, generate your own swfs using OSS etc.

    Someday the net will get over those flash intros and see flash for what it is - a compact, cross platform plugin

  32. Server side java�. by (H)elix1 · · Score: 1

    Argh - way to many 'but java applets suck' posts already. They do. Wrong tool for the job. Just about any servlet textbook will give an example where an image was created on the server side, set the appropriate response type, and stream it back to the user. As long as you are creating the image on the fly, there is nothing stopping you from also creating an image map/html that gives you user interactivity. Odds are post/re-paint will be enough. Take a look at mapquest.com or most interactive maps that push you a gif for an example.

    Reliance on the client will lead to nothing but heartache IMHO.

    1. Re:Server side java�. by aminorex · · Score: 1

      Trying to do gui by image maps will lead to nothing but
      an unusable application.

      --
      -I like my women like I like my tea: green-
  33. IE5? I'd say so by PhilHibbs · · Score: 1
    Is IE5+ a wide enough target for an enterprise application?
    Google sees very little else.
    1. Re:IE5? I'd say so by Anonymous Coward · · Score: 0

      Please keep in mind that Google's web server seems to work best for agents when they connect and specify that the User-Agent is MSIE. Other programs may also be allowing their users to simulate MSIE by setting the User-Agent header. This stat does not indicate how many user use IE, just how many wanted pages formatted for IE browsers. Fine line, but an important one.

  34. Consider Java *and* SVG by Boiotos · · Score: 1
    Don't forget that the Batik SVG toolkit includes a Java Graphics2D class that outputs to SVG. This means roughly that any class that draws stuff to the screen can be quickly tweaked to draw the same stuff to SVG. If you find a pleasing Java graphing package whose source is open, you could use it to make SVG graphs on the server. (I assume when you claim that java is slow, you are referring to client startup or something.) Just remember to gzip the output stream because svgz documents are about 20-30% the size of their svg equivalent.

    Finally, it should be noted that the upcoming Adobe SVG Viewer 6 (available now in beta plays nice with Mozilla / Netscape 7. (Although a win32 binary only is provided, the team at Adobe stated that they are building for Linux and OS X, too.) Assuming ASV6 will be out by the time your project is done, platform breadth isn't a problem for you.

  35. damn lies... by erinacht · · Score: 1

    Beware of statistics... This google graph is very good and someone else has quoted 5% of world wide web viewers are not IE
    The internet statistics site estimates 605.60 million online so a litte itsy bitsy (statistically) 5% of that works out at 30.28 million NOT USING IE!

    Anyway - besides the point really - it's an enterprise application - how many people (not percent) in the OP's organisation are using IE vs others - if that number is high enough, then go for IE, but make sure you generate standards compliant markup so the enterprises choice of browser is not down to bad coding, but down to features, ease of use, familiarity and other good reasons like that.

    1. Re:damn lies... by Pieroxy · · Score: 1

      Keep in mind also that ALL WINDOWS USERS have IE at hand, even though thay might appear as Moz/Opera/Whatever in these statistics...

    2. Re:damn lies... by erinacht · · Score: 1

      And on one last note, remember that not all versions of Internet Explorer were made equal.

      You cannot use IE5 and IE6 side by side and assume that they are equal - they are far from it.

      And as for IE4... don't even go there!

  36. Hmmm... by Tyrdium · · Score: 1

    Would Flash work for something like that? I'm not sure how the speed compares to Java, though...

  37. Anybody ever hear of Graphics Server? by RolandGunslinger · · Score: 1

    I rolled by own active-x dll using Graphics Server 6 to produce jpegs, the image map, and all the supporting html. Upside, Graphics Server is a very robust graphing tool; downside, still has some issues with concurrency. Plus; no client side components needed.

  38. Important Phrase - Enterprise Application by borkus · · Score: 1

    By "enterprise application", I take it this is an application with a large number of users (10,00+), but still internal to your company.

    I'd agree with the above post for an external website. About the only two plug-ins that you can reasonably count on people having are Flash and Acrobat Reader. And IE 5+ would limit you to about 90% of the browsing public - you don't want to turn away 10% of your potential customer base.

    However, if the application is internal to your company, requiring a plug-in is very reasonable. You do need to make sure you have an easy way to distribute the plug-in and that you have your support people ready when you implement your app. In fact, part of your app should be detecting if someone has the plugin then directing them to the correct page to install it. A plug-in based system linke SVG or Flash is a little easier to install than a Java Runtime Environment. However if you plan on creating more web applications, you may find yourself needing a standard JRE eventually.

    I wouldn't limit myself to IE - a better standard would be the W3C's recommendations or you could check out the Web Standards Project. If you must use IE, I strongly recommend IE 6. Again, you may need to upgrade some people's browsers; you just need to include that in your implementation.

  39. I would use java by hswerdfe · · Score: 1

    first the word "ENTERPISE" is a pet peeve of mine.
    exactly what does it mean?
    as far as I can tell, its supposed to mean high end software with every feature possible and a much lower than average bug count.

    but that dosen't tell you if ie5 is a large enough target market, and itdoesn't tell you if a plugin is acceptable to use.

    If you have 100% control over the machines you will be installing on then yes ie5 is an aceptable taget.

    it is always acceptable to expepect the user to intall a
    plugin if
    1. your software is a useful AND
    2. your software will be used many many times.
    don't expect a user to install some fucking plugin to visit your site once.

    as for the technical aspect.
    I would use java, based completely on the fact that I know how to use java.
    there would be a huge learning curve for me to use flash, or SVG....but I'm not the issue.

    go to the guy who is going to do the coding and ask him what technology they know best.

    then use it.

    --
    --meh--
  40. You've been FUDed by aminorex · · Score: 1

    Take a look at www.sodaplay.com, or news.bbc.co.uk.
    Tell me again that Java applets are too slow.
    Try to reimplement those applets in Flash, then tell me
    again.

    --
    -I like my women like I like my tea: green-
    1. Re:You've been FUDed by Pieroxy · · Score: 1

      Java Applets are not slow per se, but the Java plugin is a pain to start. On a laptop a little busy, it can take somewhere around 10 seconds...

    2. Re:You've been FUDed by Pieroxy · · Score: 1

      Plus, the first time I clicked on it, it froze my browser. Granted, some other applets running might have been introducing some crappy threads in there, but welcome to the real world. If we use Java, we share the same JVM with any other Applets our end-user is viewing, and if one dead-lock with the GUI thread, we're also dead.

  41. Agony of Expectation by 4of12 · · Score: 2, 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.

    --
    "Provided by the management for your protection."
  42. SVG demo page -- including charts by XaXXon · · Score: 2, Informative

    Here's a link to an adobe site with SVG demos. If you look 4 down from the top, you'll find an interactive chart demo.

    I think this may be a good example of what you're looking for.

    In terms of support, if you plan on having this application around for a while, SVG is only going to get more popular.

    1. Re:SVG demo page -- including charts by zero_offset · · Score: 1

      This tells me SVG is *slow*. Check out the CML2SVG demo on a PC in the 1GHz range. Yikes. I've seen faster simple wireframe spins on a 286. (Yeah, I understand how much more is going on under the hood, but this is still painfully slow.)

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

  43. Macromedia Flash by nsebban · · Score: 1

    Flash is a good way to do that.

    - It usually generates small .swf files (as long as your scenes are clean)
    - It's scriptable so that you can generate dynamic charts without a big effort.
    - Everybody's got a flash plugin, as it exists for nearly every OS.

    And as the Flash community is really huge on the web, you will easyly find many resources and tutorials about building that kind of animations.

    --
    ____
    nico
    Nico-Live
  44. Java not so good by Stormalong · · Score: 1

    I had to deal with this for the web GUI for one of our products. The solution has gone through a few revisions. The graphs consisted of two pie charts and a bar chart.

    Version 1: images generated on the server (perl script using GD). This worked well, but I came to dislike how it had to download a new image every time you refreshed the page. Some of our customers were on pretty slow links. Also, we wanted the next version to work on Windows (v1 was on linux), and the perl/GD thing was going to be a pain. Our product is a web cache, so obviously I'm a bandwidth conservationist, and the bandwidth needed to download the images over and over offended me. :)

    Version 2: images generated on the client using a java applet (purchased...it was only $50 or so). Nice, because the images are generated client-side, but the applet took awhile to download on slow links, and the startup time is BRUTAL. I came to hate this solution.

    Version 2.1: pie charts done with Flash, bar charts done with DHTML/javascript. This has been working great! Flash starts up instantly, and almost everyone already has it. The numbers for the graphs are just included in the HTML code, and Flash/javascript uses those numbers to generate graphs. There are 2 numbers for each pie chart, and 60 numbers for the bar graph. Being text, they take up very little bandwidth.

  45. What SPARKLING *insight* by Anonymous Coward · · Score: 0

    slashdot is pathetic... rules by 12 years olds with a grudge.

  46. DHTML/CSS by joeldg · · Score: 1

    DHTML and CSS are probably your best option. you can specify exact screen coordinates which DHTML and place pixels. All the display crunching is done on client side and the layout is done on your side. I have used this same thing for doing placements on a map of the world.

    1. Re:DHTML/CSS by josepha48 · · Score: 1
      Yes, listen to this post. DHTML is very powerful and many people don't use it. With DHTML you can support Opera 6+, Konqueror3+ (maybe earlier versions?), IE4+ and NS6.1+ with very little difficulties. Using the div tag you can do wonders.

      EG: create a style sheet that creates a div with a border. Change the height on this and add in absolute positioning and you now have a bar graph. Data could be sent to the client in a a set of JavaScript arrays (one for X, one for Y or 2 d array). Create a few functions for A controlling layout and B controlling size and tada you have pretty client side graphs and charts without a plugin. Will work pretty nicely on above mentioned browsers too.

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

    2. Re:DHTML/CSS by Pieroxy · · Score: 1

      Well, very tempting, but how do you draw a pie chart with this solution? Granted you can position DIVs of one pixel anywhere in your page, the DOM control is not that fast that performance is going to become a major issue.

    3. Re:DHTML/CSS by josepha48 · · Score: 1
      You add a few more functions, drawLine(x,y,xx,yy) and draw circle() or a draw piepeice() / drawArc(). Intially it would be alot of work. There may even be libraries out there already that does some of this. With DHTML you can also add in mouse movements (yes you can do that in flash and java too). At this point you are talking about creatig geometric shapes on a canvas using JS.

      At that point the question becomes a matter of algorythms.

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

    4. Re:DHTML/CSS by josepha48 · · Score: 1
      FYI: this draws a circle:


      function drawCircle(r, x, y) {

      maxx = (2 * r) + x;
      maxy = (2 * r) + y;

      for (j = x-r; j<(2*r)+x;j++ ) {
      s = Math.round(100*Math.sin(j)) + x;
      c = Math.round(100*Math.cos(j)) + y;
      document.write('<div style=border:solid;border-width:1px;border-color:b lack;position:absolute;width:1px;height:1px;top:') ;
      document.write(s);
      document.write(';left:');
      document.write(c);
      document.write(';></div>');
      }
      }

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

    5. Re:DHTML/CSS by Pieroxy · · Score: 1

      Have you tried it ???

      First of all, here is an implementation that works with most browsers:


      function drawCircle(r, x, y) {
      for (j = 0; j < (2*Math.PI);j+=1/r ) {
      s = Math.round(r*Math.sin(j)) + x;
      c = Math.round(r*Math.cos(j)) + y;
      var elem = document.createElement("DIV");
      elem.style.borderWidth = "0px";
      elem.style.backgroundColor = "black";
      elem.style.position = "absolute";
      elem.style.top = s + "px";
      elem.style.left = c + "px";
      elem.style.width = "1px";
      elem.style.height = "1px";
      elem.style.fontSize= "0px";
      document.all["abcdef"].appendChild(elem);
      }
      }


      You should learn to use the DOM instead of document.write....

      Second, this is not reasonnably fast. Drawing 5 circles takes 4 seconds on my P3 1GHz (IE5)...

      Not mentionning that the more you add DIVs this way, the more your DOM becomes bloated and the slower it becomes to add more.

    6. Re:DHTML/CSS by josepha48 · · Score: 1
      Yes that is the other way you could do it. Yes it is very slow, when drawing circles.
      You should learn to use the DOM instead of document.write....

      I know DOM! My web site has a neat little digital clock that was done in all DOM using the document.createTextnode(newtime); I also have a dhtml calendar, that uses obj.innerHTML = stuff too.

      The poster was asking what ways to create charts for the web, when he asked about pie charts I did a quick and dirty example. The advantage to doing it my way is that some of the styles could be put in stylssheets. Of and if you looked at my example closer, you probably would have noticed that I had cos y and sin x which is backwards. Alternatively one could use a 1x1 gif image and use that instead of a div. Not sure what the performance gain or loss would be. I'd imagine that at this point using DHTML / DOM for charts would be medocre performance. Flash would probably be better, or a custom plugin.

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

    7. Re:DHTML/CSS by Pieroxy · · Score: 1

      know DOM!

      Sorry, that didn't came out right.

      The poster was asking what ways to create charts for the web

      I know, I am the poster ;-)

      I actually found a library that does all that you describe in a more "optimized" way. Very cool in fact: Check it out

      The drawback is the performances, of course. Got to keep your graphs simple...

    8. Re:DHTML/CSS by josepha48 · · Score: 1
      Sorry, that didn't came out right.

      no problem, I've been coding JS before there was DOM in Netscape, so I am used to the docuement.write() I am slowly moving to the DOM model on my website and work, but also want to keep some compatibility with older browsers, that don't do DOM / JS very well.

      I know, I am the poster ;-)

      Interesting, so what made you post first and ask slashdot, then search for JS libraries? Just out of curiousity. I always 'google it'.

      I am checking out the library, it is very cool. I just downloaded it now. It uses the DOM, and basically implements a mkDiv() function that does what my document.write does, only it does all the calculations first and creates the HTML string and THEN writes the data. I just tried this out with a modified version of my example and it works bit faster.

      If you go with this lib, it would probably be best to stick to 1 graph or 2 graphs per page. Also I'd do bar graphs over pie whereever possible, it may increase the speed of the draring. In using bar graphs if you have 5 'peices' you could then use only 5 divs and just vary their size. In the pie / circle you end up with however many divs it takes to create a circle of that size. Good luck.

      --

      Only 'flamers' flame!
      Does slashdot hate my posts?

    9. Re:DHTML/CSS by Pieroxy · · Score: 1

      I've been coding JS before there was DOM in Netscape

      I know, me too, I even still have old reflexes to write stuff the Netscape4 way...

      what made you post first and ask slashdot, then search for JS libraries?

      I honestly didn't think that one could be an enough geek to spend the time and effort necessary to build such a library. I didn't even know if that was doable within reasonnable performances/stability.

      I did try to google for something like that but didn't get much success.

  47. ColdFusion by Tablizer · · Score: 1

    I would note that ColdFusion has tags that draw various graphs. True, there are probably some open-source equivalents, but if you already are using CF, then give it a try. Like everything else, CF makes it pretty easy to get started[1]. (I found some of them buggy, but maybe they have since been fixed.) I believe is generates the graphs on the server, and then just sends a GIF to the browser.

    [1] Fast learning/starting and long-term productivity are not necessarily related, I would note. CF is pretty easy to learn, but it is somewhat hard to build certain types of frameworks with IMO.

  48. perl GD module by staplin · · Score: 2, Informative

    I've been using TWiki for collaboration notes, and one of its features is a plugin for charting. It manages to draw jpegs and pngs using the perl GD module and the gd library.

    Of course, you'd need to write your own server side to generate the chart you want, but these tools put you easily along that path.

    1. Re:perl GD module by Anonymous Coward · · Score: 0

      The person three up from this post got called a cave monkey for not-fully reading the posts. I thought that was really harsh. Since this post and the next one didn't read it either I would say that guy is a minority.

      No server side stuff... Duh, cave monkey

      uhhhh, I feel better for making fun of someone under an AC on Slashdot. Me real internet man now...

  49. Depends on deployment strategy by Anonymous Coward · · Score: 0

    The biggest issue will doubtless be deployment issues in the it department?
    1) is it an intranet -- if so then you can use anything.
    2) is it an extranet -- if so then you cannot use any plug-ins with IE without runninginto firewall isuues.

    3) are you deploying for IE or windows-- usually it deployments are very targeted. If IE then use VML not because it is good, but because you will not have firewall problems. (We had to deal with this) If mozilla, then use svg and require the special mozilla build with integrated svg to be deployed.

    YOU DO NOT WANT TO BE IN A SITUATION WHERE A USER CANNOT INTERACT BECAUSE OF A FIREWALL BLOCKING ACTIVEX OR JAVA>

  50. javascript vector graphics by JayClements · · Score: 2, Informative

    http://www.walterzorn.com/index.htm
    haven't used it, but the demo is fast and interactive.

  51. Java whiteboard applet by Hard_Code · · Score: 1

    Just use a java whiteboard applet. They are all over, search google.

    --

    It's 10 PM. Do you know if you're un-American?
  52. Flash once, data many by yelvington · · Score: 2, Informative

    Flash isn't just for animation any more. It's an interactive UI delivery platform.

    Write a generalized interactive graphing tool in Flash. Then have it fetch a simple data file (delimited text or XML) via HTTP.

    You can update the data dynamically and transmit the results with extremely low overhead.

    Flash kicks Java's butt when it comes to availability, reliability, predictability and performance. Flash on Linux is absolutely the same as Flash on Windows or the Mac. It just works.

    We have used Flash's ability to fetch dynamic data via HTTP to build "live" traffic and weather maps and perform other integration of constantly changing information.

    1. Re:Flash once, data many by Anonymous Coward · · Score: 0

      Why don't you try one of the Blue-Pac's Turbine FLASH generation products?

      They are very cost effective and most important: they are very robust and are able to generate a great deal of already designed graphical charts. You just have to select your data-source (DB based, XML, flat text, etc.), quickly configure it and voilá!

      It works with PHP, ASP, .NET, C++. You can download a free-trial version and follow one of their tutorials. You can even check out great sites that use their products.

  53. Not sure about what you really need... by kwerle · · Score: 1

    Two options we use are
    JFreeChart (http://www.jfree.org/jfreechart/index.html), which is totally serverside generated. Not sure what you mean when you say you need interactive charting - we let the user spec some params and toss them a graph.

    On the other side of the spectrum we also use
    SpotFire (http://www.spotfire.com/) which is not at all free, but which is REALLY powerful. Scientists and statisticians seem to love it...

  54. Re:Flash once, data many with Turbine ... by Anonymous Coward · · Score: 0

    Why don't you try one of the Blue-Pac's Turbine FLASH generation products?

    They are very cost effective and most important: they are very robust and are able to generate a great deal of already designed and ready to use graphical charts. You just have to select your data-source (DB based, XML, flat text, etc.), quickly configure it and voilá!

    It works with PHP, ASP, .NET, C++. You can download a free-trial version and follow one of their tutorials. You can even check out great sites that use their products.

  55. What is a "closed technology" by bons · · Score: 1

    Since the formats for a .swf file are publicly available from Macromedia.com or openswf.com and since people and companies outside of macromedia have written software that creates and plays .swf files, how closed is closed? Is it the fact that the format is actually owned by someone and enforced by a license?

    If so, we might as well say that Linux is a "closed technology" because of the GPL.

    If we have to have FUD, can we at least keep it off the main page?

  56. Um, pay attention. by stonecypher · · Score: 1

    Flash is probably over kill and a closed technology.

    Flash isn't overkill at all. Except for sound. This is essentially the sort of thing it's designed for: to quickly render vector graphics. Notably, it's got a far larger deployment than SVG, Java/Javascript, or VML. Also, because the viewer is closed, it's both compliant with its own standard, and relatively stable. Moreover, it's ubiquitous; it ships with pretty much everything, and can be downloaded in a form appropriate to nearly every major web browser in short order.

    But it's not closed technology. Macromedia set up OpenSWF some years back (april 1998, to be specific.) They release all of their specs usually a month or two late; F6MX is indeed out.

    Moreover, PHP (and presumably others) have Flash support libraries set up. It seems that PHP+Flash is exactly what you want. It's a little bit of a pain in the butt the first time around, but once you get used to describing everything in terms of arcs, it's actually kind of intuitive. Plus, you get all of the graphics effects that Flash provides. And you can see it on your Palm Pilot. And probably your watch, these days.

    --
    StoneCypher is Full of BS
    1. Re:Um, pay attention. by Pieroxy · · Score: 1

      Hmmm...

      Notably, it's got a far larger deployment than SVG, Java/Javascript, or VML

      Funny, I don't know how Flash could have a better deployment than Javascript which is built in virtually ALL browsers. Giving that VML is natively supported by 93% of the browsers out there, it seems also problematic.

      Anyways, thanks for the insight. PHP is irrelevant for me since the generation of the graph has to happen on the client side.

    2. Re:Um, pay attention. by stonecypher · · Score: 1

      Funny, I don't know how Flash could have a better deployment than Javascript which is built in virtually ALL browsers.

      JavaScript nee ECMAScript became standard-ish around the 3rd generation browsers. Shockwave and Flash are circa 2nd generation browsers. Moreover, in legacy browsers, Javascript has notorious implementation problems.

      Where do you get the statistic that VML is 93% native? I, for one, would be stunned if that were true. That said, if the graphing has to be pure-client-side, VML won't help, and neither will SVG, without JavaScript over the DOM, which is even less common and even less uniform.

      Flash is your answer.

      --
      StoneCypher is Full of BS
    3. Re:Um, pay attention. by Pieroxy · · Score: 1

      Well, download: IE3+, Netscape3+, Opera3+, Konkeror1+. They all have JavaScript. Natively. It is not an option of the installer, you just can't have one of these browsers without JavaScript. Since Flash doesn't even run on all of them, I don't know how you can find that Flash has a better deployment than JavaScript.

      For the sake of the example, let's focus on 99.5% of the browsers which are: Netscape4+, Opera5+, IE4+ and Konqueror (Mozilla is included in NS4+ in my example).

      The difference is stunning: Flash can run on any browser, if you choose to install it, while JavaScript runs natively on every one of them. You just can't disable it or 50% of the websites out there doesn't work anymore, so you re-enable it very quickly.

      So I hope the JavaScript question is settled. And please, even with the bugs that are out there, the common denominator of all the JavaScript engine deployed is still a good enough language to animate a bar/pie chart.

      Now for VML, the computation is simple:
      Netscape4+: 2%
      Opera5+: 1.5%
      Konqueror: ??% (most likely below 1)
      IE4: 0.5%
      Leaves the winner: IE5+: 94%

      There you go: VML runs natively on 94% of the web browsers out there.

      Even more if you think about it. All people running Opera or Netscape on a Windows platform have a IE5+ at hand, and if you impose IE5+ for your Web App, you can probably grab them as well.

      So? Flash is still more widely deployed than that? Perhaps by 1 or 2%.

      Now considering an enterprise application, if we leave the art/design department out of the game (because they don't use an enterprise application), that leaves probably 99% of Windows, with 100% having an IE5+ installed.

      Counting that some IT teams are security freaks and don't want any "unsafe" plugins installed and block the HTTP ports to Java applets, Flash files and so on (that does exist, trust me. Let's put the bar to 2% of the companies out there), Flash has a 98% coverage of my target.

      VML has 99%. Runs natively. No need for 5% of our retarded users to install the last version because they still run the v2 plugin.

      Well, can you still maintain that "Flash could have a better deployment than Javascript" ? Javascript+VML doesn't even need a deployment!!!

    4. Re:Um, pay attention. by stonecypher · · Score: 1

      JavaScript nee ECMAScript became standard-ish around the 3rd generation browsers.

      Well, download: IE3+, Netscape3+, Opera3+, Konkeror1+. They all have JavaScript.


      Uh huh. Remember that if I tell you something, you don't need to tell me back. Download IE2 and Netscape2; you can still get Shockwave.

      Natively. It is not an option of the installer, you just can't have one of these browsers without JavaScript.

      Flash is in all of the installers too. And javascript can be turned off. This is a nonissue.

      Since Flash doesn't even run on all of them,

      Flash on Opera, Flash on Konqueror. So, what again? Or do you think it fails to run in IE or Netscape?

      I don't know how you can find that Flash has a better deployment than JavaScript.

      As I already told you, because Shockwave and Flash are circa 2nd generation browsers and Moreover, in legacy browsers, Javascript has notorious implementation problems . Moreover, any browser which can pick up netscape plugins - of which there are quite a few - can pick up flash; none of them can pick up exetrnal JS/ECMAS implementations. And if a browser doesn't have one, it doesn't have both, in general (lately, 6th gen browsers have begun to strip the machine down, so this is becoming less true. Still.)

      For the sake of the example, let's focus on 99.5% of the browsers which are: Netscape4+, Opera5+, IE4+ and Konqueror

      I can't understand this. They're not 99.5% of the user base, they're not 99.5% of the broswer list by a longshot.

      Flash can run on any browser, if you choose to install it, while JavaScript runs natively on every one of them.

      That said, Flash is enabled in essentially every deployment, whereas as any web master has learned the hard way, JavaScript is oftentimes turned off. Moreover, there are many legacy browsers which support shockwave, flash, or futuresplash which don't support JavaScript.

      Ah, but here's the killer, which I also already told you: Gen 3 browsers won't help. Their JS/ECMAS implementations don't touch the DOM, so you can't use them to write VML or SVG.

      Moreover, VML has no chance of making it into other browsers. If you're going to use a standard, use a W3C standard like SVG.

      You just can't disable it or 50% of the websites out there doesn't work anymore,

      Nonetheless, many people do indeed have it disabled, just like cookies. You strike me as the sort of person that used the marquee tag and got angry when some of the web didn't use IE.

      so you re-enable it very quickly.

      You'll find that most people which go to the effort of turning off parts of their browser aren't clueless and are aware of the ramifications of their actions. That is to say, "nuh-uh."

      So I hope the JavaScript question is settled. And please, even with the bugs that are out there, the common denominator of all the JavaScript engine deployed is still a good enough language to animate a bar/pie chart.

      When you're writing browser select clauses for your DOM touching, just remember, someone warned you.

      Now for VML, the computation is simple:
      Netscape4+: 2%
      Opera5+: 1.5%
      Konqueror: ??% (most likely below 1)
      IE4: 0.5%
      Leaves the winner: IE5+: 94%


      Something tells me you made these numbers up. For example, this shows netscape holding about 11% of the market (IE holds 84; other parties, 5.)

      Even so, there's something mildly infuriating about people which rebuke perfectly good cross platform standards just because 5% of the market can't see them. What's wrong with using the standards that get to everyone? Why do you feed Microsloth's market dom

      --
      StoneCypher is Full of BS
    5. Re:Um, pay attention. by Pieroxy · · Score: 1

      Ok, I didn't plan for that to be a flame, so I'm going to try and calm it down and focus on the original problem: Deploying interactive graphs for an enterprise application.

      Download IE2 and Netscape2; you can still get Shockwave.

      Well, I think we need to be realistic here. I started this flame talking about IE3 and NS3, there is most likely no need to get down to the 3 or 2 versions: They are gone.

      Even if they were not totally gone, I don't give a rat's ass if someone deliberately choose to view my website through IE3 or 2, and that breaks.

      Flash is in all of the installers too. And javascript can be turned off. This is a nonissue.

      Well, in a different way. Flash is included in the installer as an option, JavaScript is part of the core of the browser. That's what native means. Granted you can disable JavaScript.

      My point here was that if you disable JavaScript, a lot of websites will stop working (hotmail, ... I don't want to get to an exhaustive list here). If you don't install Flash, most of the websites (or at least a greater percentage) will work. It even has a good side effect: You avoid a lot of ad banners.

      Flash on Opera, Flash on Konqueror. So, what again? Or do you think it fails to run in IE or Netscape?

      Again, my bad, I flaimed. They have the same coverage. (Please don't come back with the IE2/NS2 point, it is irrelevant).

      As I already told you, because Shockwave and Flash are circa 2nd generation browsers and Moreover, in legacy browsers, Javascript has notorious implementation problems . Moreover, any browser which can pick up netscape plugins - of which there are quite a few - can pick up flash; none of them can pick up exetrnal JS/ECMAS implementations. And if a browser doesn't have one, it doesn't have both, in general (lately, 6th gen browsers have begun to strip the machine down, so this is becoming less true. Still.)

      I assume you want to make a historical point with the circa 2nd generation browsers, right? Let's get back to the real worls where I didn't see one of these since so many years. Historical point taken though.

      As I said, the common denominator of the JS implementation in the version 4+ browsers is largely good enough to animate a stupid pie chart. There is bugs, for sure, but you are not going to tell me that ALL and EVERY ONE of the 6 generation of Flash plugins were ALL bug free, right? On all browsers for all platforms? Granted I'm just taking a guess here, but that would be really amazing!!!

      I can't understand this. They're not 99.5% of the user base, they're not 99.5% of the broswer list by a longshot.

      Allright. Again, if I can't tell, you can't either Even the popular browsers I'm listing doesn't all appear on most of the statistics websites. And we're not going to trust only one of them, are we ?

      We'll just have to guess out there. The assumption I am making (and that's only an assumtion) is that most of the users using a browser that is not in this list as it's browser of choice does have one of these at hand. Obviously true for windows users (which are shown as more than 90% on all that stats websites I've found so far).

      That said, Flash is enabled in essentially every deployment, whereas as any web master has learned the hard way, JavaScript is oftentimes turned off.

      "enabled in essentially every deployment" What the hell does that mean? All ? Essentially ? Every ?

      In my experience, webmasters doesn't just disable JavaScript for all websites. Usually the intranet zone have some lower securities settings, like JavaScript enabled. Remember I'm talking about an enterprise Application.

      Moreover, there are many legacy browsers which support shockwave, flash, or futuresplash which don't support JavaScript.

      Can you tell me of one that would be used by more than 1% of the users out there ? (IE: that would be relevant to this kind of dis

    6. Re:Um, pay attention. by stonecypher · · Score: 1

      You seem to have a near-miraculous capacity for answering half of the concerns of a rebuke at once while blindly ignoring the other half, and missing the bigger picture. As this is getting way too long, I'm going to cull most of the diatribe; if you feel I've left out important bits, go 'head and reintroduce them. Culling is a dangerous act (especially during debate, even moreso when making mirrored statements,) so I welcome suggestions that I've missed an issue.

      Well, I think we need to be realistic here. I started this flame talking about IE3 and NS3, there is most likely no need to get down to the 3 or 2 versions: They are gone.

      (sarcasm dropped) The bigger issue here isn't supporting browsers from the depths of history. The issue is that the VML solution not only drops viewers needlessly, but does so on a closed corporate agenda plan which is being passed over by other browsers in favor of superior open standards; furthermore, that there are alternate, superior, lower cost of development/deployment commercial open platforms with greater market penetration. Each and every statement you make in VML's defense works better for both Flash *and* SVG, with the notable exception of complaints regarding SVG's immature penetration (which I agree are quite valid.)

      The core of my argument is this, and this is what I'd like you to address: VML gains you nothing over Flash, while rendering more slowly, touching fewer platforms, rendering in lower quality, and providing much less support for outside-object integration. Furthermore, VML has no construction facilities in popular dynamic systems, whereas Flash has a good many. Further still, VML is a platform-locked solution not only now but for the foreseeable future. Also, VML is boring.

      Flash is in all of the installers too. And javascript can be turned off. This is a nonissue.

      Well, in a different way. Flash is included in the installer as an option, JavaScript is part of the core of the browser. That's what native means. Granted you can disable JavaScript.


      You're dodging the point. In both cases, the default is for the system to be installed, and in both cases the user must go to effort to disable the system. Does it matter that the user may more thoroughly disable Flash than Javascript? I think it doesn't. If you can find counterpoint, I'm all ears. Critical ears, but ears nonetheless.

      In almost every other office there was a PC running on the network to allow you to use Office/IE when needed. Ah! By targetting IE I also get those

      Meaningless rhetoric. "I had a store that sold doughnuts. Then, I decided to restrict my doughnuts to those wearing at least four items of clothing, including shoes and jewelry. This excluded 5% of my customers. In almost every home there was an extra hat or scarf that would allow the customers to visit my store if needed. By targetting people with four clothing items, I was able to reach them too."

      No. That's just not how it works. If you exclude 5% of the audience for no good technical reason or advantage whatsoever, then by targetting their exclusion mechanism, when there's a seperate machine than their normal machine which they must laboriously visit to view your ill-designed site, you are not also targetting them. They're getting by on the prevalance of the machination that you've chosen, nothing more.

      As I said, the common denominator of the JS implementation in the version 4+ browsers is largely good enough to animate a stupid pie chart.

      Nonetheless, this only holds merit if Flash cannot, which it can. More quickly, more appealingly in a graphic sense, with a better capacity for scaling complexity to the machine environment, with more limited resources or older deployments, and plagued by fewer of the implementation bugs that you seem unwilling to address as significant simply because you feel that they're rare.

      Because really, if it only affects a few percentage points, then the advan

      --
      StoneCypher is Full of BS
    7. Re:Um, pay attention. by Pieroxy · · Score: 1
      You seem to have a near-miraculous capacity for answering half of the concerns of a rebuke at once while blindly ignoring the other half

      That might be because we're not talking about the same thing, because I noticed the same in your post. You probably have shares in MM or something... ;-)

      and missing the bigger picture

      Well, you've left out my points and answered in my side comments... hard to see the big picture in that.

      As this is getting way too long, I'm going to cull most of the diatribe; if you feel I've left out important bits, go 'head and reintroduce them. Culling is a dangerous act (especially during debate, even moreso when making mirrored statements,) so I welcome suggestions that I've missed an issue.

      Allright, what about:
      • My point here was that if you disable JavaScript, a lot of websites will stop working (hotmail, ... I don't want to get to an exhaustive list here). If you don't install Flash, most of the websites (or at least a greater percentage) will work. It even has a good side effect: You avoid a lot of ad banners.
      • In my experience, webmasters doesn't just disable JavaScript for all websites. Usually the intranet zone have some lower securities settings, like JavaScript enabled. Remember I'm talking about an enterprise Application.
      • Though if anything, the SVG standard confirm to me that VML is the way to go. In a few years, no doubt we will have native support (Or at least good plugins) for every major browser. The transition from VML will be smooth as SVG is a kind of superset of VML (Not exactly, granted, but it will definitively be faster to do the VML to SVG move than from any other tech...)
      • Now you will almost instantly notice that there is two categories of statistics: Those showing IE5+ over 90%, and those showing it below. Interesting. You will also notice easily that all the statistics showing IE below 90% are issued from universities, research centers and tech websites. Hmm, not the typical crowd I see on my enterprise network.

      (sarcasm dropped) The bigger issue here isn't supporting browsers from the depths of history. The issue is that the VML solution not only drops viewers needlessly, but does so on a closed corporate agenda plan which is being passed over by other browsers in favor of superior open standards; furthermore, that there are alternate, superior, lower cost of development/deployment commercial open platforms with greater market penetration. Each and every statement you make in VML's defense works better for both Flash *and* SVG, with the notable exception of complaints regarding SVG's immature penetration (which I agree are quite valid.)

      You're missing my point again. We're selling an enterprise application. By saying "You need IE5" to have the full features, we're cutting down 5% of our customers. By saying Flash, we might very well be cutting more. Remember again that the decision is not made at the IT level but at a higher business level.

      You're dodging the point. In both cases, the default is for the system to be installed

      False. If I choose minimum install, I believe that Flash will not get installed. JavaScript will.

      That said, good design also designs for utility rather than to market; you don't seem to realize that writing this in a manner exclusively useful to corporate settings will relegate it to being successful to corporate settings. Which may seem all well and good to you, until you ask yourself why you're making that restriction, given that it gains you nothing whatsoever.

      So you're telling me that Siebel should not target the corporate setting? Who else could possibly use it?

      If you have a valid answer, I'll be glad to reconsider our corporate target.

      I eagerly await any notice of what's so cool about VML that you can't do in Flash, or SVG. Anything whatsoe

  57. So in summary... by darnok · · Score: 2, Informative

    Putting together the responses to date, it seems like this is the story:

    SVG: lots of potential; the ideal solution if the plugin is installed or easily installable; XML based

    Flash: the pragmatic choice; installed nearly everywhere; works reliably on all platforms; can be driven via XML

    VML: good fit for IE 5+ browsers, since it's supported in a default install; unsupported in Mozilla; deprecated technology; XML based

    Java applet: slow to startup; JFreeChart looks very powerful provided startup times are acceptable and browser support is available

    In case you can't tell, I'm facing the same problem as the original poster. I also can't deploy server-side solutions, so PHP, Perl GD, etc are all out.

    Based on this, I'm inclined to build a generic XML solution, then rely on plugin detection and XSLT to deliver either SVG or VML as appropriate. That covers me for IE 5.5+ and anything with SVG support. The largest group that I don't have covered is Mac users and people with older browsers, and I could probably come up with a different XSLT to cope with them if the demand made it worth doing.

    1. Re:So in summary... by nefertari · · Score: 1

      There is also an SVG-Plugin for Safari, I do not know by whom, but I remember downloading one. So OS X-Users should be covered as well.

  58. GNU/Linux: Not a threat--yet by X-wes · · Score: 0

    The main point of my post was finding a method that would entail the least amount of updating and overall work over the long run. I admit that GNU/Linux is not a threat yet. It is already excellent, but it has not yet worked its way through the market, and it is not yet perfect. However, it is inevitable that Linux will, at the very least, keep its current user base size for some time to come, and this is a substantial enough amount to avoid alienating, if possible.

  59. To Clear the Air! by X-wes · · Score: 2

    First of all, seeing all of these flamebaits means one thing, and one thing only.

    I wasn't clear enough earlier. Sorry everyone!

    Okay, here's take 2:

    • Java and Flash require plugins (yes, Java VM, but you get my point)--on all browsers. Not fun.
    • VML: IE5.5+
      • But other browsers cannot use VML at all
      • If you don't use Windows, you cannot use IE 5.5+...therefore, all non-windows-users (including Macs!) will not be able to see the graphs
    • SVG: Mozilla ~1.5+
      • But other browsers can use SVG with a plugin, namely IE
      • Standalone IE production has stopped--many people will be looking for an alternative, and with Netscape gone, Mozilla is looking better than ever. Mozilla ~1.5+ -- no plugin for SVG needed!

    And of course the obligatory comments about how SVG is easier to script for. (More compatible: DOM/ECMAScript, etc.)

  60. I'm too late but... by dhodell · · Score: 1

    ...Flash is not a closed format. The SWF file format is open, and if you have a good reason (i.e. one to boost their interests), macromedia will send you the source code to the player.

    --
    Kind regards, Devon H. O'Dell
  61. gnuplot + perl by spectasaurus · · Score: 1

    I'm looking to do this too, and I think I've decided on using perl and gnuplot. You can write the output of a gnuplot to a jpg file quite easily using a few lines like:

    set terminal jpeg size 480,300
    set output "/tmp/plot.jpg"
    plot " awk ' { print $6 } ' /tmp/data.dat" smooth unique
    replot

    The $6 corresponds to plotting the 6th column of data in the file /tmp/data.dat

    Incorporate these lines into a perl script, and there you go, a jpg image saved as the file /tmp/plot.jpg. Now just put this plot into the html. While I haven't done this yet, it was the easiest/cheapest way I could think of.

    1. Re:gnuplot + perl by Pieroxy · · Score: 1

      These offtopic posts are killing me. Can you please read the question before answering ?

      I need a tech to draw a graph on the client-side

  62. Don't use div/span tags and css by aducore · · Score: 1

    I had to do something like this at my job a few years back, and being unfamiliar with other technologies, I produced graphs using single-pixel wide div tags with the appropriate color. While this worked, and was easily extended to produce axis, labels, and so on, the overhead is far too large. What would have otherwise probably been a 20k gif file ended up being a 2Mb html file.

    1. Re:Don't use div/span tags and css by Pieroxy · · Score: 1

      Then you might want to try this library

      The DIVs doesn't have to be generated on the server side, but on the client side through DHTML.

  63. Drawing with javascript by 2Wrongs · · Score: 1

    One of the other comments about drawing with javascript got me curious. Drawing bar charts is easy, just stretch gifs and presto. However, I wanted to do pie charts and found this interesting article.. Probably wouldn't be too hard to throw some trig at it and expand it either.

    1. Re:Drawing with javascript by Anonymous Coward · · Score: 0

      Hmmmm.... nice!
      thks

    2. Re:Drawing with javascript by Pieroxy · · Score: 1

      Overkill because of Java. If you need that, better use a Javascript based library like the following one:
      http://www.walterzorn.com/jsgraphics/jsgraphics_e. htm

  64. Java Applets by wildfrontiersman · · Score: 1

    Server side graphics are a sure way to bog down a web server fast.

    Frankly, this a silly question to anyone who knows how to write java applets. They are not slow. You may have require the user to download a recent jre. But aside from the jre download, applets are ideal for this and many other client side code. Do youself a favor and learn how to do them right and you'll be developing much richer portable apps for a long time to come.

    I am speaking from experience. Don't let people talk you out of java applets or applications. See for youself. They really do work very well.

  65. and what about TCL-TK ???? by Jarth · · Score: 1

    http://www.tcl.tk/software/plugin/ for more information, i've kind of figured this is quite interesting stuff though i have no experience but the plugins.

    --
    free dom(inion) - free energy - free your mind - whee!
  66. JFreeChart by The+Herbaliser · · Score: 1
    JFreeChart

    I've been playing with this open-source java charting library for a while now, and it's quite impressive. It can be easily integrated into applets or JSPs.