How to display arrow mark at specific bar in the barchart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vkumar011081
Posts: 1
Joined: Tue Sep 18, 2012 7:50 am
antibot: No, of course not.

How to display arrow mark at specific bar in the barchart

Post by vkumar011081 » Tue Sep 18, 2012 8:11 am

I'm new to charts. I'm able to create a bar chart. But no knowledge on how to show an arrow shape/image on top of a bar. Please share me few lines of code if possible to get that.

|
|
|
|_|^|__|_|__|_|__|_|__
Its quite urgent, I appreciate early response.

matinh
Posts: 483
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: How to display arrow mark at specific bar in the barchar

Post by matinh » Tue Sep 18, 2012 10:59 am

There are a few possibilities. Which is the best depends on the concrete needs.
  • You could use XYPointerAnnotation/CategoryPointerAnnotation for drawing arbitrary pointers in the plot. There is also XYImageAnnotation for drawing images. Search the forum and read the JavaDoc for details.
  • You could modify the used renderer. Basically this is derive from your renderer class (e.g. XYBarRenderer) and override drawItem() Method.
hth,
- martin

maddy
Posts: 2
Joined: Thu May 02, 2013 1:12 pm
antibot: No, of course not.

Re: How to display arrow mark at specific bar in the barchar

Post by maddy » Fri May 03, 2013 10:36 am

even i want to do the same thing.can anione please tell us.Thanks in advance

Locked