Scatter plot - Image instead of a dot, is it possible?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
hsp707
Posts: 18
Joined: Thu May 15, 2008 4:58 pm

Scatter plot - Image instead of a dot, is it possible?

Post by hsp707 » Wed Jul 30, 2008 12:57 am

Hi Folks,

Is it possible to display an image/icon instead of the standard dot (at X,Y ) that's used in scatter plot charts? For example, if the chart is for displaying water content in some thing, then I want to display a droplet instead of a round dot. Is it possible with JFreechart (except by adding XYImageAnnotation). Thanks a lot.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Jul 31, 2008 3:28 pm

StandardXYItemRenderer has a method you can override to return an image that will be drawn for a data item. It was contributed by another developer a long time ago, and isn't used a lot, but it should still work. Alternatively, it wouldn't be hard to implement a custom renderer to do what you want.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked