Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Pie slice must remain exploded until another pie slice is clicked
divyani
<p>Hi,</p>
<p> </p>
<p>I have two pie charts in my report. The first chart displays the number of customers by country. When i click a pie slice on the first chart, country name is captured(inside Y series client scripts) and a filter is applied on the second chart to show the number of customers by city for that country..</p>
<p> </p>
<p>When the above is done, the first chart is also re rendered even though there is no change associated with it. Can this be avoided?</p>
<p> </p>
<p>One more question is, when i click on a pie slice on the first chart, the slice has to remain exploded until i click on another slice of that chart so that the user gets a clear understanding about the drill down that is happening. </p>
<p> </p>
<p>Please find the sample report attached.</p>
<p> </p>
<p>Thanks in advance!</p>
Find more posts tagged with
Comments
Clement Wong
<p>The chart appears to be re-rendered because the animation is enabled. Can you turn it off? If you need animation for the first time, you can set to true, and then have a flag to turn it off for subsequent clicks.</p>
<p> </p>
<p>The pie slice can be exploded if you add a variable to save the last state in the click (<span style="font-family:'courier new', courier, monospace;">categoryDataClicked = categoryData;</span>), and then in the <em>beforeDrawDataPoint </em>event, you can check for that point and explode that slice.</p>
<pre class="_prettyXprint">
beforeDrawDataPoint: function(point, pointOptions, chart, seriesIndex, pointIndex)
{
if (point.name == categoryDataClicked)
{
point.slice();
}
},</pre>
<p>See attached for the revised sample.</p>
divyani
<p>Thanks you so much. It is working.</p>
Clement Wong
<p>Glad to help out.</p>