Home
Analytics
How to explode Pie Chart ?
PommePote
Hey everyone,<br />
I have another little question, but I can't find a way to set it up.<br />
I would like to explode a slice of a Pie Chart when the value of the slice is the greatest value. <em class='bbc'>(see the attachments)</em><br />
<br />
I can't do this via the expression builder : I can get the current value (valueData) but I don't know how to build the expression, I would like something like "if (valueData == 'maxValue')".<br />
I try to set and use a global variable, but it seems to not be interpreted.<br />
<br />
I think I have to use the Scripting, I find a function on PieChartSerieImpl : <strong class='bbc'>setExplosionExpression()</strong>.<br />
But I don't know how I can express "when the current value equals the max value".<br />
And I also don't really know when set up the script (on <em class='bbc'>beforeDrawSeries </em>?, ...)<br />
<br />
Thanks you,<br />
Best regards, <br />
<br />
PommePote
Find more posts tagged with
Comments
mwilliams
Take a look at this example. The script in the chart script sets a variable that is recalled in the chart editor expression for the explode slice when. It was made in BIRT 3.7.0.
PommePote
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="82225" data-time="1314900343" data-date="01 September 2011 - 11:05 AM"><p>
Take a look at this example. The script in the chart script sets a variable that is recalled in the chart editor expression for the explode slice when. It was made in BIRT 3.7.0.<br /></p></blockquote>
<br />
Hi mwilliams,<br />
And thanks you very much, that works perfectly.<br />
When I tried, I tried to use the reportContext in the chart expression editor, but I think that we can't use it in it.<br />
<br />
Thanks you,<br />
PommePote.
mwilliams
Glad to help. Let us know whenever you have questions!
Deb P
<p>Hi Michael,</p><p> </p><p>Where is the explample? I don't seem to find it.</p><p> </p><p>Thanks,</p><p>Deb</p>
kclark
<p>Hi Deb, I'm not sure if <a data-ipb='nomediaparse' href='
http://www.birt-exchange.org/devshare/_/designing-birt-reports/1418-explode-largest-pie-slice-in-pie-chart'>this
is the example</a> in mwilliams post but it should show what you're looking for</p>