Невозможно исключить определенные значения из графика с помощью amchart - PullRequest
0 голосов
/ 23 марта 2012

Невозможно устранить нули при построении графика.Я хочу построить только те значения, которые я хочу построить при получении значений из набора данных.

Вот код, который я использовал для динамического построения диаграмм с использованием коллекции массивов.

    //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>

Заранее спасибо

...