Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 853
  • Last Modified:

how to show image in jfreechart

I want to show an image instead of a shape for each item in my xy scatter plot using JFreeChart. I was able to extend xylineandshaperenderer to draw an image but i can show the same image for each item. I want to show image specific to each item. I looked at the source code, the code uses int to represent an item(as against an object), it makes difficult to modify it, any ideas to do it in the simplest way?
0
npl77
Asked:
npl77
  • 2
1 Solution
 
CEHJCommented:
You would properly have to override a paint/paintComponent method. Try using the int as a index into a map-like structure
0
 
npl77Author Commented:
thanks CEHJ, i thought of doing that, actually i am getting data from database....to use int as index, i'll have to write the dataset myself..i don't think of any easier way, i guess thats the only way to go, i was wondering if there is a better way, the source code of jfreechart is by no means object oriented and not extensible but after all its free, so i've no right to complain :)
0
 
CEHJCommented:
:-)

Perhaps you could have a look at this too?

http://java-source.net/open-source/charting-and-reporting/cewolf
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now