Reputation: 36058
I have to generate some graphical chars, and I've used pChart util now. I'm thinking to use svg based graph from now on, because of the mouse event seems to be handled more easy.
I've seen raphael js samples and svgweb library, but i didn't find any samples about how to use svgweb for charts.
1) do you know where I can see some samples about how to use svgweb for chart generation?
2) do you think that i have to continue in using pChart, or to progressively replace it's use in my app?
Upvotes: 1
Views: 2508
Reputation: 3768
try this its one of the best I ever used:
http://www.highcharts.com/demo/
I think its not 100% free, but its not that expensive, and you can use some of the charts there for free
Upvotes: 0
Reputation: 4973
There are several Java based chart libraries available out there. If you have Java support, I would recommend using JFree Chart. It is open source and extensively used in major reporting projects. JasperReports library uses JFree Chart, and it is very reliable.
It has support for vector graphics format like SVG. I had created bar-charts, pie-charts, 2- level comparison bar charts and 3-level comparison bar charts for my projects using JFreechart. This library is highly flexbile, to meet any kind of graph creation requirements.
Upvotes: 1
Reputation: 1059
SVG Web uses Flash to render SVG in in non-SVG compliant browser. To make sure your SVG graphis works for 95% of the web you can use SVGWeb, IE9 and all modern browsers supports SVG, so you might not require SVGweb in long run. But there are lot of other libraries which can help here:
JQuery SVG : http://keith-wood.name/svggraphRef.html Protovis : http://vis.stanford.edu/protovis/
Upvotes: 2
Reputation: 4097
First a clarification: Svgweb doesn't generate charts.
svgweb is an SVG compatibility shim. It takes an existing SVG and handles presenting it in non-SVG capable browsers (using a clever combination of JS and Flash).
So... to use svgweb you will need some other means of generating an SVG chart - server-side, client-side, Google Charts.
I looked briefly at pChart and it did not appear to render SVG, so you'd need to find another charting tool. Here are few from around the web (there are probably many more viable options):
A nice primer on svgweb is this alistapart article. Their example uses an existing / hand-made SVG. Yours would likely be dynamic, but the general idea is the same.
All that aside, I think you should look no further than gRaphael, which you mentioned. You'll get IE compatibility and chart creation rolled into one elegant package, and mouse events are a cinch.
Most chart types are handled nicely out of the box, but you could always go custom with some additional work, leveraging base Raphael objects. You've probably seen this already, but here's the requisite alistapart overview: http://www.alistapart.com/articles/svg-with-a-little-help-from-raphael/
Upvotes: 1
Reputation: 10417
If you are not that attached to using pChart, you could have a look at the Google Charts API. There seems to be a few php wrappers for them too (here, gchartphp and here), if you want to use it in that way.
Upvotes: 2