Animate Pie Chart Wedge SEPARATION
Is it possible to start with the entire pie chart, and then animate a wedge separating from the chart?
PS - I know how to animate each individual pie chart wedges from appearing on a slide, that is not what I am trying to do.
OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal() (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
Using the dataToLocal() method
The dataToLocal() method converts a set of values to x and y coordinates on the screen. The values you give the method are in the "data space" of the chart; this method converts these values to coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the chart, and the second value maps to the distance from the center of the chart along the radius.
The coordinates returned are based on 0,0 being the upper-left corner of the chart. For a ColumnChart control, for example, the height of the column is inversely related to the x coordinate that is returned.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29
Similar Messages
-
Hi,
I am trying to build a pie chart that will fire a custom function on rollover of the individual pie wedges.
I need to be able to pass information about the wedge that is rolled over (i.e. a name or id) to this function.
Thanks.I am close. I just need to find the right path to the wedge id.
This is what I have so far.
<fx:Script><![CDATA[
import mx.charts.events.ChartItemEvent;
private function itemClickHandler(e:ChartItemEvent):void {
var selectedIndx:String= e.currentTarget.series.index; //<--returns null
]]></fx:Script>
<s:VGroup>
<mx:PieChart width="220" height="220" id="piechart1"
dataProvider="{srv.lastResult.AAFunds.fundName}"
itemClick="itemClickHandler(event)"
>
<mx:series>
<mx:PieSeries displayName="pie series 1" />
</mx:series>
</mx:PieChart>
</s:VGroup> -
I need help with creating a custom pie chart class that will allow a function call on pie wedge rollOver.
Right now I can get a function call on rollover using itemRollOver using;
import mx.charts.events.ChartItemEvent;
-in the <mx:PieChart>;
itemRollOver="pieChart_itemRoll(event);"
-which calls this function
private function pieChart_itemRoll(evt:ChartItemEvent):void {
var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
trace(psi.item.target);
Please advise on how can I put this into a custom PieChart .as that extends PieChart?
Currently itemRollOver in my custom class throws an undefined property error.
Thanks.OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal() (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
Using the dataToLocal() method
The dataToLocal() method converts a set of values to x and y coordinates on the screen. The values you give the method are in the "data space" of the chart; this method converts these values to coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the chart, and the second value maps to the distance from the center of the chart along the radius.
The coordinates returned are based on 0,0 being the upper-left corner of the chart. For a ColumnChart control, for example, the height of the column is inversely related to the x coordinate that is returned.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29 -
Pie chart wedge end position.
Hi,
I need one urgent help. I need to get start and end position of the wedge corner's in pie-chart. I need to draw some thing using those points. So i need thier global positions.
Thanks,
Sathyamoorthi.OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal() (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
Using the dataToLocal() method
The dataToLocal() method converts a set of values to x and y coordinates on the screen. The values you give the method are in the "data space" of the chart; this method converts these values to coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the chart, and the second value maps to the distance from the center of the chart along the radius.
The coordinates returned are based on 0,0 being the upper-left corner of the chart. For a ColumnChart control, for example, the height of the column is inversely related to the x coordinate that is returned.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29 -
I've searched high and low on how to do this and can't find anything. Here's the scenario - Lets say you have a pie chart and you want to animate it so that you have 2 sections both at 50%. But you want to show 1 half of the 50% starting at 20% then growing to 50% then the other half can grow to fill the pie chart. There's no way to make one half go from 20% then grow to 50% with out it being made into 2 different sections- it makes it a separate set/section and different color. Same thing with bar graph, you can't make the same line animate to grow higher. There doesn't seem to be a way to append on to the same bar.
It's late and I may not be very clear, if so just let me know and I'll try to rephrase it.The top image is a screen shot from edge and what it should be like, and the bottom image is of when you preview it in dps
Also when i view this in browser via edge animate and then preview it seems fine and as you can see on the bottom image when i import the oam into indesign again it is fine but then when I come to preview my 'folio it turns the animation from a circle into a square.
Also if its any help, the animation works perfectly if exported by epubs and viewed through ibooks.
Thanks, -
How to retrieve pie chart wedge id
Hi.
I'm trying to figure out how to get an id or index of a specific wedge from a pie chart
I think I'm close. I just need to find the right path to the wedge id.
This is what I have so far.
<fx:Script><![CDATA[
import mx.charts.events.ChartItemEvent;
private function itemClickHandler(e:ChartItemEvent):void {
var selectedIndx:String= e.currentTarget.series.index; //<--returns null
]]></fx:Script>
<s:VGroup>
<mx:PieChart width="220" height="220" id="piechart1"
dataProvider="{srv.lastResult.AAFunds.fundName}"
itemClick="itemClickHandler(event)"
>
<mx:series>
<mx:PieSeries displayName="pie series 1" />
</mx:series>
</mx:PieChart>
</s:VGroup>Figured it out.
Here is a simple example;
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/11/15/displaying-a-pieseries-items-data-when-a-user-clic ks-an-item-in-a-flex-piechart-control/ -->
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
>
<fx:Declarations>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.charts.series.items.PieSeriesItem;
import mx.charts.events.ChartItemEvent;
[Bindable]
public var chartDP:Array = [
{wedgeName:'Pie wedge 1', percent:45 },
{wedgeName:'Pie wedge 2', percent:25},
{wedgeName:'Pie wedge 5', percent:22},
{wedgeName:'Pie wedge 4', percent:8}
private function pieChart_itemClick(evt:ChartItemEvent):void {
var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
myTextArea.text += "\rwedgeName: "+psi.item.wedgeName+" percent: "+ psi.item.percent;
]]>
</fx:Script>
<s:VGroup>
<mx:PieChart id="pieChart"
dataProvider="{chartDP}"
itemClick="pieChart_itemClick(event);"
showDataTips="false"
height="300"
width="300">
<mx:series>
<mx:PieSeries id="pieSeries"
field="percent">
</mx:PieSeries>
</mx:series>
</mx:PieChart>
<s:TextArea id="myTextArea" y="82" width="350" height="250" />
</s:VGroup>
</s:Application> -
How did Steve group exploded wedges in pie chart
In his MacWorld keynote today, Steve showed a pie chart with 3 wedges exploded together (9:36 in, the US SmartPhone Marketshare slide). The Apple wedge is exploded, but so are the Palm, Motorola and Nokia wedges, yet they are exploded together, with no space between them. Is this possible in Keynote '08 or is Steve using unreleased features? I've tried selected all three and changing the explode value, but they separate.
I'll post the .key file used to create that image.
http://idisk.mac.com/makentosh-Public/multixplode.zip
The main things to consider is:
a) Don't move the wedges you want "connected"
b) You'll need one "Preview Passthru" for each separately exploded bit
So, you begin by setting up your chart with all the appropriate elements. Then, pull away the ones you DON'T want stuck together. Preview Passthru them (Copy, Open Preview, Command-N, Copy, Paste back into Keynote OR Preview Passthru for short), then use the "Draw a Shape" to click out a shape that surrounds the ones that are stuck together. Select the shape and the image and "Mask with Selected Shape". If you've only got two separated groups, move all the others back to the center, move the "attached" ones away and Preview Passthru that group, then mask it.
You'll see how I masked all three parts in the linked Keynote file. -
Problem with wedge in Pie chart
Hi all,
i'm having a Pie chart which has some four or five sections. By using wedge option i'm able to cut out a single piece from the whole chart. But my requirement is i need to show all pieces individually. Is it possible? Please help me in this.
Kind regards,
karthickHi Karthick,
it is not impossible, but it is not very easy to accomplish this. First of all, the chart engine (Corda PopChart) is bounded by OBIEE. What I mean is that OBIEE doesn't use the full functionality of the chart engine, so when you want to customize the chart, beyond the functionality OBIEE uses, then there is no other option then to edit the PopChart XML files (.pcxml). In ..\OracleBI\web\app\res\s_oracle10\popbin\ and ..\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\popbin you can find pie.pcxml which defines the pie chart.
About your problem: you want to explode all wedges in your pie chart. According to the Corda documentation you can only explode one wedge, but it is possible to create a pie chart with gaps between all wedges and you can also set the size of the gap. So by setting these parameters I guess you can get what you want.
Example: You need to add ShowPieGap='True' to this line in the .pcxml.
<Properties Effect='2D' EffectPercentX='10' EffectPercentY='60' OutlineType='Darker' ShowPieGap='True'/>I also recommend you to read John's experiences with editing PCXML of Corda:
http://obiee101.blogspot.com/search/label/CORDA
http://obiee101.blogspot.com/search/label/PCXML
Regards,
Stijn -
Pie chart created in edge animate changes to a square animation when imported into dps
I Have created an animated pie chart in edge animate and all works fine.
I then import into indesign and again all looks fine (even though at this stage it is a flat image) but when i export for dps and preview folio etc the animation turns from a circle to a square.
Anyone have any pointers or experinced the same problem etc?
CheersThe top image is a screen shot from edge and what it should be like, and the bottom image is of when you preview it in dps
Also when i view this in browser via edge animate and then preview it seems fine and as you can see on the bottom image when i import the oam into indesign again it is fine but then when I come to preview my 'folio it turns the animation from a circle into a square.
Also if its any help, the animation works perfectly if exported by epubs and viewed through ibooks.
Thanks, -
Pie chart highlight selected wedge.
I am trying to highlight the current clicked wedge in a pie
chart by changing the property "outerRadius" of the item
(PieSeriesItem). But it has no effect... My idea is to expand the
wedge a bit above the others. Is there any other method? Where
should I go in the doc to find this?OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal() (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
Using the dataToLocal() method
The dataToLocal() method converts a set of values to x and y coordinates on the screen. The values you give the method are in the "data space" of the chart; this method converts these values to coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the chart, and the second value maps to the distance from the center of the chart along the radius.
The coordinates returned are based on 0,0 being the upper-left corner of the chart. For a ColumnChart control, for example, the height of the column is inversely related to the x coordinate that is returned.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29 -
How can I evenly space wedges from an exploded pie chart?
I'm creating a pie chart widge exploded wedges in Illustrator CS3 but I'm having trouble keeping all the wedges aligned evenly. Does anyone have any tips on doing this? My eyeing attempt is terrible.
I think the best way is by eye and if you are trying to make one seem as if it is especially called out then you want that one not to be evenly spaced like the others.
Like such
If you want them all to be equally emphasized then you will do better by eye like such
And if you want more space then it will look a bit less consistent but no more so than any other approach and making the colors lighter is not going to resolve any geometric issues. -
Pie Chart with a separated pie - How to achieve in WD ABAP
Hi Experts,
My requirement is to create a pie chart and separate a pie depending upon the user logged in. To explain, I will take example of a leave request. A leave request goes throgh 3 approvals i.e 3 different departmens. The graph should show the no of requests per department. Depending upon the user logged - his dept. pie should be highlighted or separated. How to achieve this using webdynpro abap.
Thanks in Advance.
Best Regards,
Aleem Mohiuddin.Hi,
you can achive this using FlashIsland UI element.
refer Adobe Flash Islands Integration SAP help,
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/1b/eac5a6dc724b5cb7a6cc6b91fbbd64/frameset.htm
Thanks,
Chandra -
Hi Folks,
I need to have a 3D pie chart and then animate only the amount of the pie I want to show, not the rest of it. I have tried creating a pie chart and made the proportions to equal 100%. By animating the build in as 3D grow I can make the wedges come in, but I only want the first wedge, not the second: I then want to get rid of that chart and have another chart do the same thing with different numbers. Anyone got any idea how I may do this?
Many thanks,
ColinIn the Build Inspector, select Delivery by Wedge, and then in the Build From section, choose "First" as the start, and "1" as the end. This has the effect of building in only the first wedge (you can also build in various contiguous subsets of the wedges as well).
-
Pie chart with legend as a column
Watch the Keynote '09 Video Tutorial "Create and Edit a Chart": http://www.apple.com/iwork/tutorials/#keynote-chart . A pie chart is shown where the legend appears as bullets arranged in a column. When I try to create a pie chart, the legend appears as bullets arranged in a row. How to switch the legend from a row format to a column format, as in the video?
Hi Pion - I worked on those videos, so I've got your answer.
You can select a chart's legend separately - click on it until you see bounding boxes just for the legend - then drag the left bounding box towards the right, and the numbers will become a column.
Let's say you wanted that layout for future charts in that presentation. First arrange your legend as you would like it, then click once on the chart itself to select the chart (the legend will be de-selected - no problem). Then go to *Format - Advanced - Set Chart and Legend Geometry for All Masters*. The relationship between the legend and the cart will then stay the same. -
Post Author: Janice
CA Forum: Charts and Graphs
I have a report written in Crystal Reports XI that has a pie chart in the Report Header displaying counts of activity by "reason code" for a selected time period. The users have noticed that, when they run the report for different time periods, the same "reason" has a different color on each report. It seems that the default is to sequence colors based on volume (size of 'pie wedge').
They would like to have the colors appear linked to Reason Code rather than to volume. Is there a way to change the pie chart color scheme so that it is coded by "description" not by "count"?hi,
As you are selecting 'Color Highlight' for different Pie Slices, "For all records" option shouldn't be selected.
It should be "On Change of".
Then obviously you will see the colors specified in 'Color Hghlight' tab.
Regards,
Vamsee
Maybe you are looking for
-
I just tried to buy Flowpaper from the app store but now my screen seems fr
I confirmed my credit card and billing details now I have a black shadow over the centre of the screen where the billing info panel was. and nothing seems to be happening. I have only bought this iPad last week it is an original one refurbished 16 gb
-
How to create a response file for Acrobat 9 Pro?
I with to collect data from a PDF form made with LiveCycle Designer. The instruction say- After a user submits a form, open the returned form. In the Add Completed Form To Responses File dialog box, select one of the following: I am totally baffled a
-
Updated osx and flash storage for macbook air and now i can't start up
I updated my macbook air, and now when it restarts I get a circle with a line through it, then the apple, then the screen turns blue, and then it takes me right to the disk utility. It wont boot my desktop. Help!
-
Flash Object Display in GUI HTML VIEWER
Is there a way to display html string in html viewer which contains the flash objects? Regards, Santhosh.
-
Problems with Acrobat 7.0 Browser document / close a document
Hi, I'm trying to write an application in C# which let to preview pdf doc and to print them. For this, I use the Acrobat 7.0 Browser document control but I have some problems with it: I have a grid with some doc titles and when I select one of them,