How to show/display percentage of each section in pie chart using dynamic jasper?

StackOverflow https://stackoverflow.com/questions/8211007

  •  05-03-2021
  •  | 
  •  

Вопрос

I had created the pie chart using dynamic jasper API 3.1.9. The output of the program is showing the sections with name only. I want to display the percentage of each section in pie chart.

What are the additional elements to add or set so that my chart will display percentage?

Это было полезно?

Решение

Try this

I gave the current version (3.0.13) a try and solved my problem using the setLabelFormat in the DJPieChartBuilder. I used the following format "{0}\n {2} ({1})", where 0 is the expression of the PropertyColumn set in "SetKey(...)", 1 the absolute value and 2 the relative value. Maybe this could be useful to others.

This was on dynamic jasper forum http://dynamicjasper.com/forum/viewtopic.php?f=8&t=23

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top