无法使用amchart绘制某些​​值

时间:2012-03-23 06:50:04

标签: flex flex4 flex3 flex4.5 amcharts

无法从图表中的绘图中消除零。我想在从数据集中检索值时仅绘制我想要绘制的值。

这是我用于使用Array Collection动态制图的代码。

    //data is stored into an array collection
    private function messageHandler(event:MessageEvent):void 
    { 


        chartData.addAll(event.message.body as ArrayCollection);


        //data is provided in the AmChart
        chart.dataProvider = chartData; 

    }
    //this is the acknowledgement function
    private function ack(event:MessageAckEvent):void 
    { 
        //Alert.show(""+event.message.body);
        //here the data is again provided to the AmChart.
        chart.dataProvider = event.message.body as ArrayCollection;

        //mybarChart.dataProvider = event.message.body as ArrayCollection;

    }
<amcharts:AmGraph
                id="g0"
                lineColor="black"
                fillColors="[#000000]"
                negativeLineColor="#000000"
                negativeFillColors="[#000000]"
                fillAlphas="[1]"                

                closeField="CLOSEPRICE" highField="HIGHPRICE"
                lowField="LOWPRICE" openField="OPENPRICE" 
                type="candlestick"
                title="Price:"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v1}" valueField="NTP"  type="smoothedLine"  hideBulletsCount="30" lineColor="#b2a497"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v2}" valueField="NT"  type="smoothedLine" bullet="round" hideBulletsCount="30" lineColor="blue"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v3}" valueField="POT"  type="smoothedLine" bullet="round" hideBulletsCount="30" lineColor="#F3723F"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v4}" valueField="PO"  type="smoothedLine"  hideBulletsCount="30" lineColor="yellow"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v5}" valueField="LPNT"  type="smoothedLine" bullet="square" hideBulletsCount="30" lineColor="red"/>
            <amcharts:AmGraph title="Visits1" valueAxis="{v6}" valueField="TOP"  type="smoothedLine" bullet="round"  hideBulletsCount="30" lineColor="green"/>
        </amcharts:graphs>

        <amcharts:valueAxes>
            <amcharts:ValueAxis id="v1"  visible="false" axisColor="#000000" axisThickness="2"/>     
            <amcharts:ValueAxis id="v2"  visible="false" axisColor="#000000" axisThickness="2"/>     
            <amcharts:ValueAxis id="v3"  visible="false" axisColor="#000000" axisThickness="2"/>     
            <amcharts:ValueAxis id="v4"  visible="false" axisColor="#000000" axisThickness="2"/> 
            <amcharts:ValueAxis id="v5"  visible="false" axisColor="#000000" axisThickness="2"/> 
            <amcharts:ValueAxis id="v6"  visible="false" axisColor="#000000" axisThickness="2"/>
        </amcharts:valueAxes>

提前致谢

0 个答案:

没有答案