Use of StackedBarRenderer and getting CategoryItemEntity

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
abhorton
Posts: 3
Joined: Tue Nov 09, 2010 2:07 pm
antibot: No, of course not.

Use of StackedBarRenderer and getting CategoryItemEntity

Post by abhorton » Wed Dec 22, 2010 9:18 pm

We believe that when we use David Gilbert's wonderful StackedBarPlotRenderer, the chartEntity in the code excerpt below never is an instance of CategoryItemEntity - how can we get it to be a CategoryItemEntity????? Does the StackedBarRenderer prohibit receiving CategoryItemEntity?

chartEntity chartEntity = event.getEntity();
if (chartEntity != null) {
if (chartEntity instanceof CategoryItemEntity)

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Re: Use of StackedBarRenderer and getting CategoryItemEntity

Post by skunk » Wed Dec 22, 2010 9:55 pm

It is supposed to.

What is the type of entity you are getting

Code: Select all

System.out.println(chartEntity.getClass().getSimpleName());

abhorton
Posts: 3
Joined: Tue Nov 09, 2010 2:07 pm
antibot: No, of course not.

Re: Use of StackedBarRenderer and getting CategoryItemEntity

Post by abhorton » Wed Dec 22, 2010 10:01 pm

we are getting a plot entity

Locked