Home
Analytics
Use another series values as label on a pie chart
unknown
Hi
Is it a way to use another column of the dataset as label on a pie chart.
For example, I want to display a pie which detail the plane selling but i want to put ? label which describe the percentage of each plane in regards to all the selling ( this percentage is in a computed value in the same dataset
Thanks in advance for your answer.
Vincent
Find more posts tagged with
Comments
mwilliams
Percentile Value is one of the standard options to show for a slice of a pie chart. If you go into your chart wizard and go to the value series section of the format chart tab, you'll see a button that says "Labels". If you click on that, you'll see a list box in the pop up, titled "Values". If you click on the standard value in the box, value data, and remove it, then select percentile value data from the drop down and choose add, your chart will now show the value labels as percent of total. Hope this helps.
Migrateduser
Thanks Michael
But I was not enough explicit in my question and perhaps this question is a little crazy ;-)
For example
I have sell :
Cars 1 : 40 20%
Cars 2 : 40 20%
Cars 3 : 20 10%
Plane 1 : 30 15%
Plane 2 : 30 15%
Plane 3 : 40 20%
The % is % on total selling in computed column
And I want yo display only the pie of plane selling but displaying the % of total selling
So automatic display of % give me 30,30,40 and I wanted to put 15,15,20.
Any Idea ?
mwilliams
You should be able to store the % value into a persistentGlobalVariable in your onFetch script of your dataSet. You'd simply name the variable after the "vehicle name" field. This way, you can access the % value in your chart script by the category value, which will be the vehicle name. Hope this helps. Let me know your BIRT version, if you need an example.
Migrateduser
Hi Michael and thanks for your answer.
On eclipse Birt 2.6.0, if you have an example file, I will be interested.
Thanks in advance.
Best regards
mwilliams
Take a look at this. I use a computed column to create the label and store it in a PGV. Then, in the chart script, I recall this value and add it to the slice label. Let me know if you have questions.