title: How to show percentage in pie chart?
body: <p>I am using <em>iReport</em> and <em>JasperReports</em>, both in <em>v4.7</em>.</p>
  
  <p>I want to show the percentage of each slice in the label. Something like "Option 1 (45.67%)".</p>
  
  <p>After reading many sites I came to the following snippet.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;piePlot labelFormat="{0} ({2})" legendLabelFormat="{0} ({2})"&gt;
      &lt;plot/&gt;
      &lt;itemLabel/&gt;
  &lt;/piePlot&gt;
  </code></pre>
  
  <p>According to the documentation of <em>iReport</em>. </p>
  
  <ul>
  <li>{0} item name</li>
  <li>{1} value</li>
  <li>{2} percentage</li>
  </ul>
  
  <p>However, when I run the report on <em>iReport</em> or <em>JasperReports</em> I get only the percentage in the legend area (<em>legendLabelFormat</em>) not in label (<em>labelFormat</em>) of each slice and, also, the percentage is show as an integer not as a  float.</p>
  
  <p>Somebody knows how to show the percentage in the label and -if possible- with decimal values?</p>