PDA

View Full Version : graphing components!


vmalkani
03-29-2004, 08:31 AM
Pie Charts, Line Charts, etc would be a great added value to this product!

Thanks,

Vinay

antun
03-31-2004, 10:27 AM
Hi Vinay

You can do some charting in Laszlo with the LZX APIs. See this thread:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=718&highlight=graph

-Antun

kat
09-14-2004, 03:07 PM
I second the request for graphing components. In particular,

* Integration with or replication of network graphing functionality such that provided by the yFiles libraries.

* Compatibility with graphML

* Interactive chart components such as that provided by jFreeCharts (this may be possible in Laszlo, but it seems very basic as far as I can tell right now)

For our purposes, the layout and presentation algorithms are as important as being able to provide users the ability to interact with the graphs or charts. Libraries such as yFiles and JFreecharts provide this functionality, but it would be great if a RIA platform developer like Laszlo could integrate these functionalities so we can create an app in which there is a seamless integration of these components.

Thanks!

-Kat

jwray
10-08-2004, 09:27 AM
I'd add my vote to the need for graphing components, especially interactive ones. In fact, non interactive ones can just be generated on the server side as bitmap images right now.

This is currently stopping me from looking any further into adopting Laszlo at my site, and I'd really like to.

Originally posted by kat
I second the request for graphing components. In particular,

* Integration with or replication of network graphing functionality such that provided by the yFiles libraries.

* Compatibility with graphML

* Interactive chart components such as that provided by jFreeCharts (this may be possible in Laszlo, but it seems very basic as far as I can tell right now)

For our purposes, the layout and presentation algorithms are as important as being able to provide users the ability to interact with the graphs or charts. Libraries such as yFiles and JFreecharts provide this functionality, but it would be great if a RIA platform developer like Laszlo could integrate these functionalities so we can create an app in which there is a seamless integration of these components.

Thanks!

-Kat

antun
10-08-2004, 09:36 AM
All Laszlo components are built in LZX - there's no magic to them.

If you downloaded the LPS already, take a look in lps-2.2\lps\components. Every component, right down to comobox, button, etc. is written in the same way as you would write an application in Laszlo.

Graphing components would be no different. That said, I heartily encourage you to try writing one. Depending on what your requirements are, you might find it's really not that hard.

Take care, and good luck if you decide to try!

-Antun

jwray
10-08-2004, 12:54 PM
Antun,

you know, you're right, I'm dismissing this too soon. I must have been in a negative mood this morning.

I'm sure it's possible, I've just got painful memories of doing graphing by hand. They can be very tricky.

However, I'll try something in practice hopefully soon, rather than dismissing this based on theory.

Jonny

Originally posted by antun
All Laszlo components are built in LZX - there's no magic to them.

If you downloaded the LPS already, take a look in lps-2.2\lps\components. Every component, right down to comobox, button, etc. is written in the same way as you would write an application in Laszlo.

Graphing components would be no different. That said, I heartily encourage you to try writing one. Depending on what your requirements are, you might find it's really not that hard.

Take care, and good luck if you decide to try!

-Antun

whisperstorm
10-09-2004, 12:03 AM
I'm interested in this as well - I could certainly offer some help also - lemme know if you start creating some components.

I'm working on components as well, but they are for making games :)

sahild
10-15-2004, 08:42 AM
We are looking for a rapid dev environment and one of the criteria is not having to develop a chart/graph capability. This is a key part of any tool we develop.

d~l
10-15-2004, 11:37 AM
expand with a scenario of the most complex charting features which are needed ..

they can be added via JSP / SVG

jwray
10-15-2004, 12:03 PM
Personally, I need both a prebuilt charting library, along the lines of JFreeChart capabilities, and the ability to generate my own images. I currently do this by building and manipulating an SVG DOM.

Isn't flash a vector technology? Is there some way of accessing the underlying flash vector drawing code? As I see it now, developing a graphing component set in Lazslo would require developing a basic drawing library as well, to produce basic shapes.

As for jsp/svg integration, how?

I realise I can create and embed server generated charts within a Laszlo application. The problem, as far as I can see it, lies in having these charts interactive via Laszlo events. I see no way to do this with jsp/svg, please enlighten me if I'm wrong.

Originally posted by d~l
expand with a scenario of the most complex charting features which are needed ..

they can be added via JSP / SVG

sahild
10-15-2004, 12:05 PM
Initially we would need basic charts like:
bar, line, scatter, pie, area, etc.
Then we would need combined chart styles:
Bar/line, area/line, etc
Would like the ability for user to select a point or bar, slice and get details or have some other related action applied (drill to more detal)

d~l
10-15-2004, 01:04 PM
Personally .. I am experimenting with integration of Laszlo + PHP + SVG ..
for interactive graphics within lzx apps .. using SVG DOM rather that embedded raster images.

early days ..

but same approach should (in theory) apply to Laszlo + JSP + SVG

e.g. here ..

http://www.protocol7.com/svg-wiki/index.php/ServerSideSvg

[note: the links to printx.org on this site are broken]
..

interactivity is via PHP in my model .. interfaced to Laszlo .. then generated SVG object to be embedded in Laszlo

but this could be via JSP from Laszlo app ..

..

other relevant links

http://xml.apache.org/batik .. for SVG serving

..

and for generated images (not SVG)

http://cewolf.sourceforge.net/

which uses .. as you know ..

http://www.jfree.org/jfreechart/index.html

http://www.jfree.org/jfreechart/samples.html

jwray
10-15-2004, 01:28 PM
Thanks for the reply.

I have no problem with the dynamic generation of svg images on the server being fed to the client. I do that all the time right now. I'm using Tapestry as a Java web framework, but I've done it with JSP/Struts before. It's as simple as writing a servlet to generate and send the svg on the http response.

As an aside, I use JetChart for graph generation. It's not free, but is inexpensive, and has much better svg support that jfreechart.

If you only need to treat the svg image as one object, then there is no real problem. However, I do not see how to interface Lazslo events to specific regions within the image. For example, reacting to mouseover events of a specific bar in a bar chart. This is required to get tight intergration between generated images and the rest of the GUI. Otherwise, you're back to the request/response model for the image.

If I'm missing something obvious here on howto integrate Lazslo event framework with image generation I'd be really happy to know.

Jonny

d~l
10-15-2004, 02:16 PM
My first experiment isn't exactly a "tight integration" .. it is more of a "loose handshake".

Since I'm using PHP5 for other applications I have Apache+PHP5 on one port and Tomcat+Laszlo on another port .. connected via mod_jk2 connector on same personal localhost platform.

Apache+PHP can generate lzx and svg code on the fly, and react to events on svg (say a multi-state map).

Left window iframe views PHP/embedded SVG content (apache server:port-88).

Right window iframe views Laszlo/embedded SVG app(tomcat server:port-8080).

PHP can include Laszlo generated files.
Laszlo can include PHP generated files.

Crude hybrid .. but today this is just a rough experiment.
Later I'll try to prototype all on one server (JSP or PHP .. yes, apparently PHP has been run on Tomcat).

See the carto.net examples .. PHP + SVG .. for the end goal.

http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml

Same principles using JSP.

But I agree .. tighter SVG or Flash integration / interactivity in native Laszlo should be the real goal.

..

This article below looks promising ..

http://www.davidtemkin.com/

jwray
10-15-2004, 02:55 PM
Sounds interesting, please post your experiences, I'd be interested in what you find.

To reiterate though, I'm sure it's possible to get a browser window to show both a lazslo app and an svg image. Dynamic svg generation from the server side is not a problem. The problem comes with integrating their (svg and lazslo) event handling. I just don't see how it can be done, and I hope I'm missing something.



Originally posted by d~l
My first experiment isn't exactly a "tight integration" .. it is more of a "loose handshake".

Since I'm using PHP5 for other applications I have Apache+PHP5 on one port and Tomcat+Laszlo on another port .. connected via mod_jk2 connector on same personal localhost platform.

Apache+PHP can generate lzx and svg code on the fly, and react to events on svg (say a multi-state map).

Left window iframe views PHP/embedded SVG content (apache server:port-88).

Right window iframe views Laszlo/embedded SVG app(tomcat server:port-8080).

PHP can include Laszlo generated files.
Laszlo can include PHP generated files.

Crude hybrid .. but today this is just a rough experiment.
Later I'll try to prototype all on one server (JSP or PHP .. yes, apparently PHP has been run on Tomcat).

See the carto.net examples .. PHP + SVG .. for the end goal.

http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml

Same principles using JSP.

But I agree .. tighter SVG or Flash integration / interactivity in native Laszlo should be the real goal.

..

This article below looks promising ..

http://www.davidtemkin.com/

mcleanl
01-12-2005, 02:43 PM
Reading this thread because I too would soon want to make use of charting.

When I read the postings about PHP I immediately thought of PHP SWF Charts.http://www.maani.us/charts/index.php

d~l
01-13-2005, 02:06 AM
I agree .. that works quite nicely with PHP5 running on Tomcat server .. see recent thread (http://www.laszlosystems.com/developers/community/forums/showthread.php?threadid=1836) ..

And also thread discussing earlier experiments with another swf generation class .. freemovie.sourceforge.net (http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=1744&highlight=php)

..

In fact in testing both of these I used PHP5 phpservlet on Tomcat integrated with lzx webapp .. although PHP backend can be on a remote server it is easier for lzx to import local swf files.

MySQL is also linked to PHP.

PHP5 also offers easy SOAP connection.

The only problem I see is that although the php class creates swf files to be imported by lzx .. I'm not sure if that would work in a multi-user on-line deployment where different charts are created by different users.

Also .. I'm still interested in seeing SVG resources imported into LZX. And to have interactive links on the graphs back into lxz content.

jsundman
01-13-2005, 08:35 AM
according to the roadmap a drawing API will available in 3.0Beta2:

Drawing API
A procedural API for creating graphics within a view.

http://www.openlaszlo.org/development/roadmap/


This will not include graphing components (as I understand it) but it may help make possible solutions to some of the problems discussed above.

cabraldiniz
05-11-2006, 11:13 AM
Hi, everyone. I found this thread very interesting because I'm facing exactly this challenge. I have chart images generated by a component on the server (ChartDirector) that I want to integrate into a Laszlo App. The component generate the chart as image file (jpg, png, etc) and the image maps, originally for using with the <img> and <map> HTML tags, making the chart clickable. I could generate the image, but I dont know how to deal with the image maps. The chart must be clickable inside the Laszlo App. Any suggestions ?

Thank you, Regards

d~l
05-11-2006, 11:58 AM
You can get free PHP and SVG charting scripts which have similar features to ChartDirector (I had a quick look at their web site).

To integrate ChartDirector created graphs, the easiest approach might be to create two (or more) div containers in your HTML wrapper page.

One for openlaszlo swf and the other to display your ChartDirector creations.

By javascript you can change properties of the div containers (size, visibility) if you require to switch to full view of openlaszlo swf and hide graphics. See here for examples of div management via CSS. (http://www.aglasshalffull.org/css-resources/stylechangeswithw3cdom.html)

I now use this approach having played with several other options such as overlays, and DENG which can render external XHTML content inside the openlaszlo canvas.

More discussions in other threads in this forum.