Hello,
Is it possible to save a JFreeChart (including all maded changes over the chart or plot , like colors, titles and so on) to a file? And how to do that?
The goal is at some time to read the file and to see the same Chart as before (when i saved it)
Thanks a lot
JFreeChart to file?
-
- Posts: 5
- Joined: Mon May 19, 2008 1:34 pm
- Location: Bulgaria
- Contact:
-
- Posts: 17
- Joined: Wed Jul 30, 2008 11:54 am
Save as image
Hi,
you can save your chart as image (png or jpg).
Regards,
Sol
you can save your chart as image (png or jpg).
Regards,
Sol
-
- Posts: 5
- Joined: Mon May 19, 2008 1:34 pm
- Location: Bulgaria
- Contact:
Picture, I don't think so
I know that but this don't match the main goal!
When i read the chart i want to be able to change its properties. If it is a picture (jpeg or png) i would not be able to do whatever changes i would like to, right?
So , i'm still waiting for any solutions
thanks
When i read the chart i want to be able to change its properties. If it is a picture (jpeg or png) i would not be able to do whatever changes i would like to, right?
So , i'm still waiting for any solutions
thanks
All components implement Serializable, so you should be able to simply use the standard java serialization API.
http://java.sun.com/developer/technical ... alization/
http://java.sun.com/developer/technical ... alization/
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Agreed, but with a couple of provisos:skunk wrote:All components implement Serializable, so you should be able to simply use the standard java serialization API./
(1) I've no idea if we've maintained serialization compatibility between the versions in the 1.0.x series. If you're going to rely on it, then consider helping out to create a suite of tests to ensure that compatibility is preserved;
(2) There may still be subtle bugs in the serialization - I don't know if this feature of the code sees a lot of use, so test, test, test.
You might also want to look at the xstream project, which will serialize the charts in XML format (if you like XML).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 5
- Joined: Mon May 19, 2008 1:34 pm
- Location: Bulgaria
- Contact: