Chart -> right click menu -> save as How to save as JP
Chart -> right click menu -> save as How to save as JP
I know that programmatically we can save as JPG as well as PNG, but how to we enable this in the right-click menu (save as) option in chart? ATM it only allows for PNG.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Are you sure you want JPEG? It is a horrible (lossy) format for charts.
If you really want it, you'll need to subclass ChartPanel, and override the createPopupMenu() and doSaveAs() methods. It's not that difficult, but still a little more involved than it should be (it would be nice to have ChartPanel support some kind of "plugin" for supported image formats).
If you really want it, you'll need to subclass ChartPanel, and override the createPopupMenu() and doSaveAs() methods. It's not that difficult, but still a little more involved than it should be (it would be nice to have ChartPanel support some kind of "plugin" for supported image formats).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
It is a long time since I used Internet Explorer, but if I recall the main problem is that it doesn't fully support transparency in PNG files. You can probably avoid that issue with your charts.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

