In this modified example, I'd like to be able to gray out countries
with less than 20 medals.   Is it possible through styling or do I
need to get fancy with the dataprovider and work with 2 possible
series?


<?xml version="1.0"?>
<!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>

    <mx:Script>
        <![CDATA[

        import mx.collections.ArrayCollection;

        [Bindable]
        private var medalsAC:ArrayCollection = new ArrayCollection( [
            { Country: "USA", Gold: 15 },
            { Country: "China", Gold: 25 },
            { Country: "Russia", Gold: 35 },
            { Country: "Germany", Gold: 20},
            { Country: "France", Gold: 5 }

             ]);
        ]]>
    </mx:Script>


        <mx:ColumnChart id="column" height="100%" width="45%"
            paddingLeft="5" paddingRight="5"
            showDataTips="true" dataProvider="{medalsAC}">

            <mx:horizontalAxis>
                <mx:CategoryAxis categoryField="Country"/>
            </mx:horizontalAxis>

            <mx:series>
                <mx:ColumnSeries xField="Country" yField="Gold"
displayName="Gold"/>
            </mx:series>
        </mx:ColumnChart>

        <mx:Legend dataProvider="{column}"/>

</mx:Application>

Reply via email to