How create Pie Chart [message #253649] |
Tue, 28 August 2007 03:49  |
Eclipse User |
|
|
|
i want to show in a pie chart how many students passed(in same class) out
of 60.
for that data is 25% pass from total=60.please send me ant solution for
this i am using birt 2.2 reporting tool for reports and i am new for this.
|
|
|
Re: How create Pie Chart [message #253676 is a reply to message #253649] |
Tue, 28 August 2007 06:23  |
Eclipse User |
|
|
|
I have created a source to simulate your question.
dataset:
row["score"]
It has 60 int data to instead of the score of students.
1. Now, we can create a pie chart. Switch to "Select Data" and binding the
dataset.
2. We must add a column to know if the student is pass. Click the button
of "Data Binding..." and Add a column. For example, the column binding
name is "isPass", Data Type is "String", and the Expression is:
if( row["Score"]<60 )
{
"Not Pass";
}
else
{
"Pass";
}
3. We also to count the number of pass and not pass. Click the button of
"Data BInding..." again and Add a Aggregation. For example, the name is
"countPass", Function is COUNT.
4. And now, we can drop the column of "isPass" to Category Definition, and
drop the column of "countPass" to Slice Size Definition.
5. Work not finish. We must click Edit group and sorting( On the right of
Category Definition )to edit the group. Tick Enabled, set the type as
"Text", set the Interval as "0", set Aggregate Expression as "Count".
Now the chart is Finished. Hope that is helpful to you. Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.06475 seconds