Using the minField property

Some series types let you specify a minimum value for the elements drawn on the screen. For example, in a ColumnChart control, you can specify the base value of the column. To specify a base value (or minimum) for the column, set the value of the series object's minField property to the data provider field.

You can specify the minField property for the following chart series types:

Setting a value for the minField property creates two values on the axis for each data point in an area; for example:

<?xml version="1.0"?>
<!-- charts/MinField.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script><![CDATA[
     import mx.collections.ArrayCollection;
     [Bindable]
     public var expenses:ArrayCollection = new ArrayCollection([
        {Month:"Jan", Profit:2000, Expenses:1500, Amount:450},
        {Month:"Feb", Profit:1000, Expenses:200, Amount:600},
        {Month:"Mar", Profit:1500, Expenses:500, Amount:300}
     ]);
  ]]></mx:Script>
  <mx:Panel title="Area Chart">
     <mx:AreaChart 
        dataProvider="{expenses}" 
        showDataTips="true"
     >
        <mx:horizontalAxis>
           <mx:CategoryAxis 
                dataProvider="{expenses}" 
                categoryField="Month"
           />
        </mx:horizontalAxis>
        <mx:series>
           <mx:AreaSeries 
                yField="Profit" 
                minField="Expenses"
                displayName="Profit"
            />
        </mx:series>
     </mx:AreaChart>
  </mx:Panel>
</mx:Application>

The resulting DataTip labels the current value "high" and the minField value "low." The following example shows an AreaChart that defines the base of each column:


An area chart that defines the base of each column

For an example of using the minField property to create a waterfall or cascading ColumnChart control, see Using column charts.


Flex 2.01

Take a survey