Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Smart PIE Chart
Smart PIE Chart [message #697239] Fri, 15 July 2011 21:30 Go to next message
Scroon  is currently offline Scroon Friend
Messages: 28
Registered: June 2011
Junior Member
Hello,

For a group data like 60, 20, 10, 5, 4, 0.5, 0.25, 0.125,........

I can add a filter to only have the TOP 5 values with their category name in the PIE Chart, and the other values are lost.

Is there a way to have a Pie Chart like:
Display the TOP 5 values in different pieces with their corresponding category name, and the others(with small values from 0.5 to 0.125) in a single piece named" the Others"


Thanks in advance,
Scroon

[Updated on: Mon, 18 July 2011 13:29]

Report message to a moderator

Re: Dynamic Pie Chart [message #697990 is a reply to message #697239] Mon, 18 July 2011 14:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you remove the top n filter and just set a min slice value?
Set it on the third tab of the chart wizard under Series->Category
Series. See attached example.

Jason


On 7/15/2011 5:30 PM, Scroon wrote:
> Hello,
>
> For a group data like 60, 20, 10, 5, 4, 0.5, 0.25, 0.125,.....
>
> I can add a filter to only have the TOP 5 values with their category
> name in the PIE Chart, and the other values are lost.
>
> Is there a way to have a Pie Chart like:
> Display the TOP 5 values in different pieces with their corresponding
> category name, and the others(with small values) in a single piece
> named" the Others"
>
> Thanks in advance,
> Scroon
Re: Dynamic Pie Chart [message #697994 is a reply to message #697990] Mon, 18 July 2011 15:11 Go to previous messageGo to next message
Scroon  is currently offline Scroon Friend
Messages: 28
Registered: June 2011
Junior Member
Jason Weathersby wrote on Mon, 18 July 2011 10:49
Can you remove the top n filter and just set a min slice value?
Set it on the third tab of the chart wizard under Series->Category
Series. See attached example.

Jason


On 7/15/2011 5:30 PM, Scroon wrote:
> Hello,
>
> For a group data like 60, 20, 10, 5, 4, 0.5, 0.25, 0.125,.....
>
> I can add a filter to only have the TOP 5 values with their category
> name in the PIE Chart, and the other values are lost.
>
> Is there a way to have a Pie Chart like:
> Display the TOP 5 values in different pieces with their corresponding
> category name, and the others(with small values) in a single piece
> named" the Others"
>
> Thanks in advance,
> Scroon



Thanks Jason, it works well.

But the fixed min slice value is not very lovely....Since the value of data for pie chart changed significantly each time. Sometimes all the data fell into the "Others", sometime none of them...

I tried to use a parameter in the min slice value like "params["valueoftop5"].value" but it didn't work. The pie chart wizard seems does not support JavaScript for min slice value..

Can I set the min slice value with JavaScript in some event of the Pie chart plz?

Best,
Scroon
Re: Dynamic Pie Chart [message #698009 is a reply to message #697994] Mon, 18 July 2011 15:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Scroon

I modified the example to show it tied to a parameter. Look at the
beforeDataSetFilled script.

Jason

On 7/18/2011 11:11 AM, Scroon wrote:
> Jason Weathersby wrote on Mon, 18 July 2011 10:49
>> Can you remove the top n filter and just set a min slice value?
>> Set it on the third tab of the chart wizard under Series->Category
>> Series. See attached example.
>>
>> Jason
>>
>>
>> On 7/15/2011 5:30 PM, Scroon wrote:
>> > Hello,
>> >
>> > For a group data like 60, 20, 10, 5, 4, 0.5, 0.25, 0.125,.....
>> >
>> > I can add a filter to only have the TOP 5 values with their category
>> > name in the PIE Chart, and the other values are lost.
>> >
>> > Is there a way to have a Pie Chart like:
>> > Display the TOP 5 values in different pieces with their corresponding
>> > category name, and the others(with small values) in a single piece
>> > named" the Others"
>> >
>> > Thanks in advance,
>> > Scroon
>
>
>
> Thanks Jason, it works well.
>
> But the fixed min slice value is not very lovely....Since the value of
> data for pie chart changed significantly each time. Sometimes all the
> data fell into the "Others", sometime none of them...
>
> I tried to use a parameter in the min slice value like
> "params["valueoftop5"].value" but it didn't work. The pie chart wizard
> seems does not support JavaScript for min slice value..
>
> Can I set the min slice value with JavaScript in some event of the Pie
> chart plz?
>
> Best,
> Scroon
Re: Dynamic Pie Chart [message #698120 is a reply to message #698009] Mon, 18 July 2011 20:03 Go to previous message
Scroon  is currently offline Scroon Friend
Messages: 28
Registered: June 2011
Junior Member
Jason Weathersby wrote on Mon, 18 July 2011 11:25
Scroon

I modified the example to show it tied to a parameter. Look at the
beforeDataSetFilled script.

Jason

On 7/18/2011 11:11 AM, Scroon wrote:
> Jason Weathersby wrote on Mon, 18 July 2011 10:49
>> Can you remove the top n filter and just set a min slice value?
>> Set it on the third tab of the chart wizard under Series->Category
>> Series. See attached example.
>>
>> Jason
>>
>>
>> On 7/15/2011 5:30 PM, Scroon wrote:
>> > Hello,
>> >
>> > For a group data like 60, 20, 10, 5, 4, 0.5, 0.25, 0.125,.....
>> >
>> > I can add a filter to only have the TOP 5 values with their category
>> > name in the PIE Chart, and the other values are lost.
>> >
>> > Is there a way to have a Pie Chart like:
>> > Display the TOP 5 values in different pieces with their corresponding
>> > category name, and the others(with small values) in a single piece
>> > named" the Others"
>> >
>> > Thanks in advance,
>> > Scroon
>
>
>
> Thanks Jason, it works well.
>
> But the fixed min slice value is not very lovely....Since the value of
> data for pie chart changed significantly each time. Sometimes all the
> data fell into the "Others", sometime none of them...
>
> I tried to use a parameter in the min slice value like
> "params["valueoftop5"].value" but it didn't work. The pie chart wizard
> seems does not support JavaScript for min slice value..
>
> Can I set the min slice value with JavaScript in some event of the Pie
> chart plz?
>
> Best,
> Scroon



Hello Jason,

Thanks so much for your help, now I can set the min slice value dynamically.

Best,
Scroon

[Updated on: Mon, 18 July 2011 20:04]

Report message to a moderator

Previous Topic:birt.ini
Next Topic:birt interactive viewer is not working in IE8
Goto Forum:
  


Current Time: Sun Nov 23 01:21:46 GMT 2014

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software