I am running 1.0.3 version of JFreeChart and have extended the XYBarRenderer. I need to have access to the underlying dataset within the XYBarRenderer, is this possible? Currently there is only the XYBarDataset instance within the Renderer.
I need access to the underlying dataset because I have extended the underlying dataset to be a specialized dataset of my own. Come time to draw the bars I need to know if the underlying dataset is an instanceof the specialized dataset that I designed. If it is thenI want to draw a bar around the XYBarDataset.
my best guess is there is no way to accomplish this without extending/overwriting the XYBarRenderer class.
XYBarDataset: no getter or setter for underlying dataset?
-
- Posts: 29
- Joined: Wed Jun 06, 2007 7:41 pm
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The drawItem() method, which is where you'll actually draw the bars, has a 'dataset' argument that you can use.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 29
- Joined: Wed Jun 06, 2007 7:41 pm
Thanks for your response david. We updated to version 1.0.6 and the getUnderlyingDataset() in XYBarDataset solved our problems.
What is the most stable build? We have to put together justification for updating from 1.0.3 to the most stable build. Looks like our development project is going to require us to justify upgrading to a newer version.
thanks again for your response
What is the most stable build? We have to put together justification for updating from 1.0.3 to the most stable build. Looks like our development project is going to require us to justify upgrading to a newer version.
thanks again for your response
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
OK, I misunderstood your question.MattBallard wrote:Thanks for your response david. We updated to version 1.0.6 and the getUnderlyingDataset() in XYBarDataset solved our problems.
I'd use the latest (1.0.8 ) or, if you are concerned because it has only been out for a short time, use 1.0.6 (which had 80,000 downloads and no critical problems).MattBallard wrote:What is the most stable build? We have to put together justification for updating from 1.0.3 to the most stable build. Looks like our development project is going to require us to justify upgrading to a newer version.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

