jfree / jfreechart

A 2D chart library for Java applications (JavaFX, Swing or server-side).
http://www.jfree.org/jfreechart/
GNU Lesser General Public License v2.1
1.22k stars 463 forks source link

can it generate an image with a restful api #290

Closed wendyzhaogogo closed 2 years ago

wendyzhaogogo commented 2 years ago

My requirement is to get a image of chart from requesting api with params

trashgod commented 2 years ago

Not sure about the restful API, but org.jfree.chart.ChartUtils supports several common image formats.

jfree commented 2 years ago

JFreeChart does not provide restful api mechanisms, just the chart creation framework and tools to support conversion to various formats.

gk-brown commented 2 years ago

I know this ticket is closed, but rather than creating a new one I thought I would just comment here. It seems that JFreeChart does indeed support headless operation, but it is not very well documented (there is literally no mention of "headless" in the developer guide).

I imagine this would be a common use case, so it would be nice to see some examples in the guide. The Swing examples are helpful, but I would guess (although perhaps incorrectly) that JFreeChart is being used more often on the server than the client at this point?

trashgod commented 2 years ago

This Q&A may offer some guidance.

gk-brown commented 2 years ago

Thank you, I have seen that. Not looking for assistance - just suggesting that the developer guide should contain some information about using the framework in a headless context.