Doughnut PieChart(PieChart with a hole) : Pie Chart « Chart « Flex






Doughnut PieChart(PieChart with a hole)

Doughnut PieChart(PieChart with a hole)
          

<!--
Code from Flex 4 Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1) proper attribution to Adobe is given as the owner of the user guide; and 
  (2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->



    <!-- charts/DoughnutPie.mxml -->
<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"
    height="600">
  <fx:Script>
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
      {Month:"Jan", Profit:20, Expenses:15, Amount:145},
      {Month:"Feb", Profit:1, Expenses:2, Amount:60},
      {Month:"Mar", Profit:15, Expenses:5, Amount:3}
      ]);
    </fx:Script>
    <s:layout>
        <s:VerticalLayout />
    </s:layout>
    <s:Panel title="Pie Chart">
        <s:layout>
            <s:VerticalLayout />
        </s:layout>
        <mx:PieChart id="myChart" dataProvider="{expenses}"
            showDataTips="true" innerRadius=".3">
            <mx:series>
                <mx:PieSeries field="Amount" nameField="item"
                    labelPosition="callout" />
            </mx:series>
        </mx:PieChart>
        <mx:Legend dataProvider="{expenses}" />
    </s:Panel>
</s:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Pie chart with two seriesPie chart with two series
2.Pie Chart DemoPie Chart Demo
3.SeriesSlide effect for Pie chartSeriesSlide effect for Pie chart
4.Create a pie chartCreate a pie chart
5.Set horizonta lAxis and Area Series for Pie ChartSet horizonta lAxis and Area Series for Pie Chart
6.Add a second tag to display two data series for Pie ChartAdd a second <mx:AreaSeries> tag to display two data series for Pie Chart
7.To explode all wedges of a pie chart evenly, you use the explodeRadius property on the PieSeriesTo explode all wedges of a pie chart evenly, you use the explodeRadius property on the PieSeries
8.Pie chart inner radiusPie chart inner radius
9.The following example defines a PieChart control:The following example defines a PieChart control:
10.To create a doughnut chart, specify the innerRadius property on the PieChart controlTo create a doughnut chart, specify the innerRadius property on the PieChart control
11.creates a PieChart that uses only red, white, and blue colors for the wedges:creates a PieChart that uses only red, white, and blue colors for the wedges:
12.Add a drop shadow filter to a PieChart control, Flex renders that drop shadow filter in addition to the default drop shadow filter on the PieSeries.Add a drop shadow filter to a PieChart control, Flex renders that drop shadow filter in addition to the default drop shadow filter on the PieSeries.
13.Create a PieChart control and applies a drop shadow to itCreate a PieChart control and applies a drop shadow to it
14.Set nameField property of a PieChart control's data series to ExpenseSet nameField property of a PieChart control's data series to Expense
15.PieChart with ActionScriptPieChart with ActionScript
16.Handle PieChart item click eventHandle PieChart item click event
17.Set selection model for PieChart to single selectableSet selection model for PieChart to single selectable
18.Describe the properties of the PieChart's PieSeriesDescribe the properties of the PieChart's PieSeries
19.defines an Array of custom SolidColor objects, and applies it to the PieSeries object in the PieChart control.defines an Array of custom SolidColor objects, and applies it to the PieSeries object in the PieChart control.
20.Exploding PieChartExploding PieChart
21.creates a PieChart that uses a spectrum of reds for the wedges:creates a PieChart that uses a spectrum of reds for the wedges:
22.Pie custom LabelPie custom Label
23.Pie ExplodePie Explode
24.Pie Multiple SeriesPie Multiple Series
25.Pie Set Fill ColorsPie Set Fill Colors
26.The fourth data point, the Car expense, is explodedThe fourth data point, the Car expense, is exploded
27.Get selected index from ChartItemEventGet selected index from ChartItemEvent
28.Change chart data provider and update data series after clickingChange chart data provider and update data series after clicking
29.Pie Label position calloutPie Label position callout