Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How I can show chart legend series dynamically based on Y series value?
How I can show chart legend series dynamically based on Y series value? [message #554884] Tue, 24 August 2010 11:40 Go to next message
Amy  is currently offline Amy
Messages: 29
Registered: April 2010
Junior Member
Hi,

I created a bar chart to display my stacked graph. I have 6 series for Y-Axis for my 6 plan types .

I use legend to display the 6 plans color. The legend always show my 6 Y-series color and value.

But sometime, the Y serise value only come back for the 4 (plans). I want the legend show series value based on Y serise. If only plan 01, 03 and 06 have values, just show 3 plans color/lable in legend.

Thanks!

Amy
Re: How I can show chart legend series dynamically based on Y series value? [message #554948 is a reply to message #554884] Tue, 24 August 2010 16:42 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Amy,

How does it look when you only have the 3 series with values? Are the
other series null?

Jason

On 8/24/2010 11:40 AM, Amy wrote:
> Hi,
>
> I created a bar chart to display my stacked graph. I have 6 series for
> Y-Axis for my 6 plan types .
> I use legend to display the 6 plans color. The legend always show my 6
> Y-series color and value.
> But sometime, the Y serise value only come back for the 4 (plans). I
> want the legend show series value based on Y serise. If only plan 01, 03
> and 06 have values, just show 3 plans color/lable in legend.
>
> Thanks!
>
> Amy
Re: How I can show chart legend series dynamically based on Y series value? [message #555170 is a reply to message #554948] Wed, 25 August 2010 13:01 Go to previous messageGo to next message
Amy  is currently offline Amy
Messages: 29
Registered: April 2010
Junior Member
Jason,

Thank you for your help!

I use java object pass data to Birt, use script to loop the java object to set up my dataset.

I use table display the data based on dataset and display the data in the Chart.

Here is the table data:

CoverLevel Plan01 Plan02 Plan03 Plan04 Plan05 Plan06

40% - 0 0 0 0 0 0
50% - 4.7 3 5.83 4.97 0 0 0
55% - 6.59 8.04 6.92 0 0 0
60% - 8.18 9.9 8.58 0 0 0
65% - 11.32 13.63 11.87 0 0 0
70%- 14.27 16.97 14.94 0 0 0
75% - 19.37 22.82 20.29 0 0 0

Sorry about the format above. I can't make it better.

X-Axia is the first column, CoverLevel: 40%, 50%....
The Y axis are 6 series plan values based on plan.

Chart display data like stacked graph. 6 plans as a group together, based on coverage level, display the plan values.

If not data for plan, which in this case are Plan 04, 05, 06, all columns are 0. The chart should only see 3 paln in legend.

Below is another table data :

CoverLevel Plan01 Plan02 Plan03 Plan04 Plan05 Plan06
40% - 0 0 0 0 0 0
50% - 4.27 5.1166 4.41 0 0 0
55% - 5.7933 6.89 5.98 0 0 0
60% - 7.04 8.3366 7.2766 0 0 0
65% - 9.5833 11.3133 9.9233 0 0 0
70% - 11.8966 13.8866 12.3166 2.53 10.44 8.24
75% - 15.9866 18.4933 16.56 3.06 14.22 12.18
80% - 0 0 0 4.09 17.28 16.04
85% - 0 0 0 5.24 23.29 21.47
90% - 0 0 0 7.56 30.04 27.23

In this case, I need see 6 plans in legend.

Thanks!

Amy
Re: How I can show chart legend series dynamically based on Y series value? [message #555187 is a reply to message #555170] Wed, 25 August 2010 14:15 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Amy,

Any chance you could put that sample data in a csv and recreate your
chart with a flat file datasource. Create 2 charts one for each set of
sample data. Zip it all up and email it to me at jasonweathersby at
windstream dot net.

Jason

On 8/25/2010 1:01 PM, Amy wrote:
> Jason,
>
> Thank you for your help!
>
> I use java object pass data to Birt, use script to loop the java object
> to set up my dataset.
>
> I use table display the data based on dataset and display the data in
> the Chart.
>
> Here is the table data:
>
> CoverLevel Plan01 Plan02 Plan03 Plan04 Plan05 Plan06
>
> 40% - 0 0 0 0 0 0
> 50% - 4.7 3 5.83 4.97 0 0 0
> 55% - 6.59 8.04 6.92 0 0 0
> 60% - 8.18 9.9 8.58 0 0 0
> 65% - 11.32 13.63 11.87 0 0 0
> 70%- 14.27 16.97 14.94 0 0 0
> 75% - 19.37 22.82 20.29 0 0 0
>
> Sorry about the format above. I can't make it better.
> X-Axia is the first column, CoverLevel: 40%, 50%....
> The Y axis are 6 series plan values based on plan.
>
> Chart display data like stacked graph. 6 plans as a group together,
> based on coverage level, display the plan values.
>
> If not data for plan, which in this case are Plan 04, 05, 06, all
> columns are 0. The chart should only see 3 paln in legend.
>
> Below is another table data :
>
> CoverLevel Plan01 Plan02 Plan03 Plan04 Plan05 Plan06
> 40% - 0 0 0 0 0 0
> 50% - 4.27 5.1166 4.41 0 0 0
> 55% - 5.7933 6.89 5.98 0 0 0
> 60% - 7.04 8.3366 7.2766 0 0 0
> 65% - 9.5833 11.3133 9.9233 0 0 0
> 70% - 11.8966 13.8866 12.3166 2.53 10.44 8.24
> 75% - 15.9866 18.4933 16.56 3.06 14.22 12.18
> 80% - 0 0 0 4.09 17.28 16.04
> 85% - 0 0 0 5.24 23.29 21.47
> 90% - 0 0 0 7.56 30.04 27.23
>
> In this case, I need see 6 plans in legend.
>
> Thanks!
>
> Amy
Re: How I can show chart legend series dynamically based on Y series value? [message #555691 is a reply to message #555187] Fri, 27 August 2010 12:25 Go to previous messageGo to next message
Amy  is currently offline Amy
Messages: 29
Registered: April 2010
Junior Member
Jason,

Thank you so much!

I just sent the files to you by email.

Please let me know if you need more information.

Amy
Re: How I can show chart legend series dynamically based on Y series value? [message #556056 is a reply to message #555691] Mon, 30 August 2010 12:53 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I replied to your email.

On 8/27/2010 12:25 PM, Amy wrote:
> Jason,
>
> Thank you so much!
>
> I just sent the files to you by email.
>
> Please let me know if you need more information.
>
> Amy
Previous Topic:Different results in Preview vs PDF/HTML format
Next Topic:The minimum number of the libraries to run the BIRT?
Goto Forum:
  


Current Time: Fri Aug 22 10:04:10 EDT 2014

Powered by FUDForum. Page generated in 0.02849 seconds