濮阳杆衣贸易有限公司

主頁 > 知識庫 > Flex實現(xiàn)雙軸組合圖的設計思路及代碼

Flex實現(xiàn)雙軸組合圖的設計思路及代碼

熱門標簽:中山外呼系統(tǒng)中間件 廣州ai外呼系統(tǒng)業(yè)務 南昌crm外呼系統(tǒng)如何 外呼系統(tǒng)號碼顯示 什么行業(yè)需要電話機器人 無錫電銷外呼系統(tǒng)代理 車載電話機器人 地圖標注多家店 天津企業(yè)外呼系統(tǒng)代理商
1、設計思路

(1)設計一個組合圖,該圖共用一個數(shù)據(jù)源
(2)組合圖是有柱狀圖和折線圖組合的
(3)柱狀圖顯示的數(shù)據(jù)是依據(jù)左邊的豎直軸,折線圖的數(shù)據(jù)依據(jù)右邊的豎直軸

2、源碼如下

DoubleY.mxml:
復制代碼 代碼如下:

?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%">
s:layout>
s:BasicLayout/>
/s:layout>
fx:Declarations>
s:SolidColor id="sc1" color="0x00BFFF" alpha=".3"/>
mx:SolidColorStroke id="s1" color="0x00BFFF" weight="2"/>
/fx:Declarations>

fx:Script>
![CDATA[
import mx.collections.ArrayCollection;

//組合圖數(shù)據(jù)綁定
[Bindable]
private var gridArray:ArrayCollection = new ArrayCollection([
{quarter:"第一季度",Monday:"78454",Tuesday:"45454",Wednesday:"12012",Thursday:"78441",Friday:"32314",Saturday:"89454",Sunday:"45421",Rate:"23"},
{quarter:"第二季度",Monday:"56444",Tuesday:"65612",Wednesday:"78454",Thursday:"45124",Friday:"35451",Saturday:"45421",Sunday:"65421",Rate:"47"},
{quarter:"第三季度",Monday:"51210",Tuesday:"94210",Wednesday:"65643",Thursday:"45011",Friday:"45122",Saturday:"45421",Sunday:"65988",Rate:"13"},
{quarter:"第四季度",Monday:"61210",Tuesday:"45122",Wednesday:"65323",Thursday:"95110",Friday:"65623",Saturday:"45111",Sunday:"65311",Rate:"17"}
]);
]]>
/fx:Script>

mx:VBox width="100%" height="100%">
mx:ColumnChart id="chart" width="100%" height="90%" showDataTips="true" fontSize="16" dataProvider="{gridArray}">
!--設置水平坐標軸-->
mx:horizontalAxis>
mx:CategoryAxis dataProvider="{}" categoryField="quarter"/>
/mx:horizontalAxis>
!--設置左豎直坐標軸的最大值和最小值-->
mx:verticalAxis>
mx:LinearAxis minimum="0.00" maximum="100000.00"/>
/mx:verticalAxis>
!--設置左豎直坐標軸的柱形圖-->
mx:series>
mx:ColumnSeries id="column1" xField="quarter" yField="Monday" displayName="星期一"/>
mx:ColumnSeries id="column2" xField="quarter" yField="Tuesday" displayName="星期二"/>
mx:ColumnSeries id="column3" xField="quarter" yField="Wednesday" displayName="星期三"/>
mx:ColumnSeries id="column4" xField="quarter" yField="Thursday" displayName="星期四"/>
mx:ColumnSeries id="column5" xField="quarter" yField="Friday" displayName="星期六"/>
mx:ColumnSeries id="column6" xField="quarter" yField="Saturday" displayName="星期七"/>
mx:ColumnSeries id="column7" xField="quarter" yField="Sunday" displayName="星期八"/>
/mx:series>
!--設置右豎直坐標軸的最大值和最小值-->
mx:secondVerticalAxis>
mx:LinearAxis minimum="0.00" maximum="100.00"/>
/mx:secondVerticalAxis>
!--設置右豎直坐標軸的折線-->
mx:secondSeries>
mx:LineSeries id="line" dataProvider="{gridArray}" xField="quarter" yField="Rate" displayName="比率"/>
/mx:secondSeries>
/mx:ColumnChart>
!--設置Legend屬性-->
mx:HBox>
s:Label width="25"/>
mx:Legend dataProvider="{chart}" fontSize="20" width="100%" height="30" direction="horizontal" horizontalGap="45" verticalGap="45"/>
/mx:HBox>

/mx:VBox>
/s:Application>

3、顯示結(jié)果

標簽:海西 滄州 欽州 攀枝花 仙桃 佛山 呂梁 泰州

巨人網(wǎng)絡通訊聲明:本文標題《Flex實現(xiàn)雙軸組合圖的設計思路及代碼》,本文關鍵詞  Flex,實現(xiàn),雙軸,組合圖,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Flex實現(xiàn)雙軸組合圖的設計思路及代碼》相關的同類信息!
  • 本頁收集關于Flex實現(xiàn)雙軸組合圖的設計思路及代碼的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    外汇| 盘山县| 宁化县| 娄烦县| 建水县| 巢湖市| 通海县| 都江堰市| 阳江市| 方正县| 昆明市| 乌拉特前旗| 高州市| 永善县| 龙泉市| 什邡市| 海伦市| 诸城市| 噶尔县| 陈巴尔虎旗| 建水县| 绥棱县| 灌云县| 新巴尔虎右旗| 新泰市| 台南市| 湖南省| 云南省| 古蔺县| 江孜县| 杨浦区| 隆尧县| 横山县| 渝北区| 浮梁县| 英超| 浦城县| 阳泉市| 平谷区| 萍乡市| 宁波市|