Hi;
I try to use this chart for my flex example but it didnt work and give me error.
Can please anybody help me with that?
 
Many thanks
 
 
********************************************************************************
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
    width="100%" height="100%"
    initialize="srv.send()">
    <mx:Script>
        <![CDATA[
        function formatDataTip(obj) {
            var name=obj.hitData.element.country;
            var fname=obj.hitData.item.fname;
            var value=Details[obj.hitData.index][obj.hitData.element.yField];
            return "<b>"+country+"</b><br>"+cf.format(value);
        }
        function currencyFormat(value) {
            return cf.format(value);
        }
        ]]>
    </mx:Script>
    <mx:HTTPService id="srv" url=""/>
    <mx:CurrencyFormatter id="cf"/>
    <mx:Model id="Details">{srv.PhoneBook.Details.fname}</mx:Model>
    <mx:ColumnChart id="chart" dataProvider="{Details}" showDataTips="true" width="100%" height="100%"
        dataTipFunction="formatDataTip">
        <mx:horizontalAxis>
            <mx:CategoryAxis dataProvider="{Details}" categoryField="fname"/>
        </mx:horizontalAxis>
        <mx:verticalAxisRenderer>
            <mx:AxisRenderer labelFunction="currencyFormat" showLine="false"/>
        </mx:verticalAxisRenderer>
        <mx:series>
            <mx:Array>
                <mx:ColumnSeries yField="total" name="Total">
                    <mx:fill>
                        <mx:LinearGradient angle="0">
                            <mx:entries>
                                <mx:Array>
                                    <mx:GradientEntry color="#B22C02" ratio="0" alpha="100" />
                                    <mx:GradientEntry color="#E3AC9A" ratio="20" alpha="100" />
                                    <mx:GradientEntry color="#B22C02" ratio="40" alpha="100" />
                                    <mx:GradientEntry color="#FD8E6B" ratio="75" alpha="100" />
                                    <mx:GradientEntry color="#B22C02" ratio="100" alpha="100" />
                                </mx:Array>
                            </mx:entries>
                        </mx:LinearGradient>
                    </mx:fill>
                </mx:ColumnSeries>
            </mx:Array>
        </mx:series>
    </mx:ColumnChart>
</mx:Application>


Click here to donate to the Hurricane Katrina relief effort.

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to