Visibility setting of XYBlockRenderer

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jahjeremy
Posts: 31
Joined: Tue Sep 25, 2012 2:49 am
antibot: No, of course not.

Visibility setting of XYBlockRenderer

Post by jahjeremy » Wed Mar 06, 2013 12:40 am

Hi,

I'm encountering a weird problem with the XYBlockRenderer. It seems like it is not respecting the setting of setSeriesVisible(0, false) that I am using to try and turn it off. Indeed, when I look at its drawItem() method, it seems like it doesn't check this. Now, I'm supposing that something that is calling this method is supposed to do this, but I wanted to check if anyone can confirm or deny this before I work on pulling out some code from my project to make an example. The only thing that seems to work is setting the renderer to null (!) which is obviously a hack.

Thanks.

--Jeremy

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Visibility setting of XYBlockRenderer

Post by paradoxoff » Wed Mar 06, 2013 10:07 am

Thats a bug in the renderer.
All you need is this line at the beginning of the drawItem(...) method:

Code: Select all

if (!getItemVisible(series, item)) return;

Locked