[lug] Creating a cute graphic on webpage

Davide Del Vento davide.del.vento at gmail.com
Tue May 10 20:10:19 MDT 2011


Gordon,
You've received already a lot of different good recommendations. I'll toss
my $0.02

I did something very similar years ago. My web pages were created in python.
The graphs in gnuplot, called "on the fly". I didn't have to bother about
scalability and security, since it was a behind a tight firewall 5-user app.
If you have to do that in the wild, I guess it'll be much more complex,
validating even the slightest data that might get corrupted by a malicious
user wanting to execute his spam engine instead of your cute gnuplot
backend. Not to mention the problem if you have a large number of users
(however it sounds like you won't).

Another option would be to see if there is a REST API that fits your needs.
I think Google offer some graph creation "on the fly" with a REST API, i.e.
what you have to do is only to create an URL like:
http://www.google.com/images/800x600/box/rounded/?datax=1,2,3,datay=10,11,12,color=blue
I'm making up the details but you get the idea. I believe that there should
be something similar you could install on your server, or offered by a
different provider, if you don't like/trust/can't_use google. But you'll
have to Google and do your homework because I've seen the things but don't
remember even the names!

Regarding others' suggestions:

I second Mike's thoughts on JFreeChart. Super-cool for a java cross-platform
application. Used and loved. Dumb on a website: tried and gave up.

I like SVG graphs a lot, although you probably want a library for plots, not
creating them from scratch. Don't know of any.

I don't like non-real-images solutions, such as CSS-only, instead. They are
not "bad" but they make cut-and-paste hard, printing must be carefully
designed, and similar nuisances. Of course this is just my opinion, somebody
will disagree.

HTH,
Davide

On Tue, May 10, 2011 at 17:01, Gordon Golding <gordongoldin at aim.com> wrote:

>  I am working with a remote sensing cluster.  Rather than just show
> numbers, I want to come up with an informational graphic.
>
> Can anybody point me to resources to figure out how to do this?
>
> I have a tank of volatile liquid which needs to be kept within temp and
> pressure parameters.
>
> So what I'd like to do is something like this:
>
> Have a rectangle - a nice oblongy, round-cornered tanky looking thing would
> be cooler - maybe cutsy background graphic with oblong transparent region in
> center....?
>
> Separate it with a line or division - the line represents how much liquid
> left in the tank, moves up and down.
>
> Top division and bottom division both change color:
> Bottom = blue for cold, green for OK, red for hot - ranging through a
> spectrum is cooler.
> Top = same changing color idea for over-pressure, nominal,
> under-pressurized
>
> Choice of colors obviously isn't a big deal, once I have the basis - like
> deep blue for the bottom, pale aqua-blue for the top, for example.
>
> I'm using Drupal, but I imagine this to not tie in at all - just be it's
> own html dropped onto blank region.
>
> Any thoughts?
>
>  Gordon
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20110510/e15f7ce7/attachment.html>


More information about the LUG mailing list