PieRenderer incorrectly caches the label object [message #234969] |
Tue, 17 April 2007 09:20  |
Eclipse User |
|
|
|
PieRenderer holds on to the series label object (i.e. laDataPoint instance
variable). This only gets initialized once in the constructor and is not
cleared/initialized at the end of the rendering process. The code that
renders the data points looks like:
private final void renderDataPoints( IDeviceRenderer idr )
throws ChartException
{
// IF NOT VISIBLE, DON'T DO ANYTHING
if ( !laDataPoint.isVisible( ) )
{
return;
}
So consider two rendering invocations R1 at time t1 and R2 at time t2. If
during R1, the visiblity of the labels was turned off (through
ChartEventHandler or by other means), the next time for R2, the data
points will not be rendered. An example use case would be when through the
ChartEventHandler we selectively display the pie slices label. Then this
use case fails
|
|
|
Re: PieRenderer incorrectly caches the label object [message #235183 is a reply to message #234969] |
Wed, 18 April 2007 10:52  |
Eclipse User |
|
|
|
Would this fix it?
if ( !ps.getLabel( )..isVisible( ) )
{
return;
}
Can you please file a bugzilla entry. We will fix this.
Thanks,
David
"Raheel Ashraf" <rashraf@ca.ibm.com> wrote in message
news:0e906bf7b9fcc6e1c3f4959bb2cd6d5c$1@www.eclipse.org...
> PieRenderer holds on to the series label object (i.e. laDataPoint instance
> variable). This only gets initialized once in the constructor and is not
> cleared/initialized at the end of the rendering process. The code that
> renders the data points looks like:
> private final void renderDataPoints( IDeviceRenderer idr )
> throws ChartException
> {
> // IF NOT VISIBLE, DON'T DO ANYTHING
> if ( !laDataPoint.isVisible( ) )
> {
> return;
> }
>
> So consider two rendering invocations R1 at time t1 and R2 at time t2. If
> during R1, the visiblity of the labels was turned off (through
> ChartEventHandler or by other means), the next time for R2, the data
> points will not be rendered. An example use case would be when through the
> ChartEventHandler we selectively display the pie slices label. Then this
> use case fails
>
|
|
|
Powered by
FUDForum. Page generated in 0.03333 seconds