Flex實現雙軸條狀圖,flex雙軸條狀

來源:互聯網
上載者:User

Flex實現雙軸條狀圖,flex雙軸條狀

1、問題背景

     一般的,柱狀圖可以實現雙軸圖,但是如何?雙軸條狀圖?


2、實現執行個體

<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"    xmlns:s="library://ns.adobe.com/flex/spark"    xmlns:mx="library://ns.adobe.com/flex/mx"    width="100%" height="100%"    creationComplete="initHandler(event)"><s:layout><s:BasicLayout/></s:layout><fx:Script><![CDATA[import mx.collections.ArrayCollection;import mx.events.FlexEvent;[Bindable]private var chartArray:ArrayCollection = new ArrayCollection([{week:"星期一",snake:"5459",cow:"7845"},{week:"星期二",snake:"8956",cow:"7845"},{week:"星期三",snake:"3562",cow:"7845"},{week:"星期四",snake:"7856",cow:"7845"},{week:"星期五",snake:"1245",cow:"7845"},{week:"星期六",snake:"9656",cow:"7845"},{week:"星期日",snake:"6784",cow:"7845"}]);protected function initHandler(event:FlexEvent):void{cate.ticksBetweenLabels = false;}]]></fx:Script><fx:Declarations><!-- 將非可視元素(例如服務、值對象)放在此處 --></fx:Declarations><mx:VBox width="100%" height="100%" horizontalAlign="center" paddingBottom="10" paddingLeft="10" paddingRight="20" paddingTop="10"><mx:BarChart id="barchart" width="100%" height="90%" showDataTips="true" dataProvider="{chartArray}"><mx:verticalAxis><mx:CategoryAxis id="cate" categoryField="week" displayName="星期" /></mx:verticalAxis><mx:series><mx:BarSeries displayName="蛇數量" xField="snake" yField="week"/></mx:series><mx:secondVerticalAxis><mx:CategoryAxis categoryField="week" displayName="星期"/></mx:secondVerticalAxis><mx:secondSeries><mx:LineSeries displayName="牛" xField="cow" yField="week"/></mx:secondSeries></mx:BarChart><mx:Legend dataProvider="{barchart}"/></mx:VBox></s:Application>

3、實現結果



Flex柱狀圖y軸顯示問題

可以的 做項目很多的組件不能適用的 所以基本都是開發人員自己拓展!
 
Flex怎雙X軸關聯

axiis 裡面的Cluster Column裡面有實現,自己做得繪圖。
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.