Flex 4 : Chart ¿Ø¼þ
http://yecon.blog.hexun.com/36798900_d.html
ʹÓà Adobe Flex ²úÆ·ÏßµÄʱºò£¬²ÉÓÃͼ±íºÍͼÐÎÀ´Õ¹Ê¾Êý¾Ý»áʹÓû§ÓëÊý¾ÝµÄ½»»¥¸ü¼ÓÈÝÒס£Ïà¶Ô¼òµ¥µÄÊý×Ö±í¸ñÀ´Ëµ£¬¿ÉÒÔʹÓñíʾÊý¾ÝµÄ²»Í¬ÑÕÉ«¡¢±êÌâ¡¢ÏßÌõÀ´Õ¹Ê¾ÌõÐÎͼ¡¢±ýͼ¡¢ÏßͼµÈµÈ¡£
ͼ±í¿Ø¼þÊÇ Adobe Flash Builder רҵ°æµÄÌØÐÔ¡£Ò²¿ÉÒÔÔÚ Falsh Builder ±ê×¼°æÖд´½¨Í¼±í£¬µ«ÊÇͼ±í¿Ø¼þÉÏÃæ»áÓÐÒ»¸öˮӡ¡£
Êý¾Ý¿ÉÊÓ»¯Ê¹Óüòµ¥µÄÊý¾Ý½»»¥ºÍÊý¾Ý¹ØϵչʾÊý¾Ý¡£Í¼±íÊÇÊý¾Ý¿ÉÊÓ»¯·½Ê½µÄÒ»ÖÖ£¬Ëü¿ÉÒÔ´´½¨¶þάµÄÊý¾Ý±íʾ¡£ Flex ÌṩһЩ×î³£ÓõÄÊý¾Ýͼ±íÀàÐÍ£¨ÈçÌõÐÎͼ¡¢±ýͼµÈ£©£¬²¢ÇÒÌṩǿ´óµÄͼ±í±íʾ¿ØÖÆ·½Ê½¡£
Ò»¸ö¼òµ¥Í¼±íչʾÁ˵¥¶ÀµÄÊý¾ÝÐòÁУ¬ÓÉһЩÏà¹ØÊý¾Ýµã×é³É¡£ÀýÈ磬һ¸öÊý¾ÝÐòÁпÉÄÜÊÇÔÂÏúÊÛÊÕÈë»ò¾ÆµêÈÕÈëסÂÊ¡£
¸ü¶à Flex ʾÀý£¬Çë·ÃÎÊ http://www.slsay.com
ʹÓÃͼ±í¿Ø¼þ
Flex ͼ±í¿Ø¼þ¿ÉÒÔ´´½¨Ò»Ð©×î³£ÓõÄͼ±íÀàÐÍ£¬²¢ÇÒ×Ô¶¨ÒåÆä±íÏÖÐÎʽ¡£Í¼±í¿Ø¼þÔÚ mx.charts.* °üÖС£
ϱíÁгöÁËÌṩ Flex ÌṩµÄͼ±íÀàÐÍ¡¢¿Ø¼þÀàÃûÒÔ¼°ÓÃÀ´¶¨Òåÿ¸öͼ±íµÄÊý¾Ý±íʾµÄÐòÁÐÀàÃû¡£
ͼ±íÀàÐÍ
ͼ±í¿Ø¼þÀà
ͼ±íÐòÁÐÀà
Area
AreaChart
AreaSeries
Bar
BarChart
BarSeries
Bubble
BubbleChart
BubbleSeries
Candlestick
CandlestickChart
CandlestickSeries
Column
ColunmChart
ColumnSeries
HighLowOpenClose
HLOCChart
HLOCseries
Line
LineChart
LineSeries
Pie
PieCahrt
PieSeries
Plot
PlotChart
PlotSeries
ËùÓеÄͼ±í¿Ø¼þ£¬³ýÁË PieChart ÀàÖ®Í⣬¶¼ÊÇ CartesianChart ÀàµÄ×ÓÀà¡£ µÑ¿¨¶ûͼ±í£¨ Cartesian
Chart £©×¨ÃÅÓÃÀ´ÔÚ¾ØÐκͶþά¿Õ¼ä±íʾÊý¾Ýµã¼¯¡£ PieChart ÀàÊÇ PolarChart ÀàµÄ×ÓÀ࣬Ëü±íʾԲÐÎÇøÓòµÄÊý¾Ý¡£
ËùÓеÄͼ±í¿Ø¼þ¶¼¼Ì³Ð×Ô ChartBase ÀàµÄ»ù±¾Í¼ÐÎÌØÕ÷¡£
ÔÚ MXML ÖУ¬Í¼±í¿Ø¼þͨ³£¾ßÓÐÒÔϽṹ£º
<mx:ChartName
>
<!-- ¶¨ÒåÒ»¸ö»ò¶à¸öÐòÁÐ -->
<mx:SeriesName
/>
<!-- ¶¨ÒåˮƽÖáÓëÊúÖ±Öá -->
<mx:horizontalAxis
>
<mx:axis
_type/>
</mx:horizontalAxis
>
<mx:verticalAxis
>
<mx:axis
_type/>
</mx:verticalAxis
>
<!-- ¶¨ÒåÑùʽ -->
<mx:horizontalAxisRenderers
>
<mx:AxisRenderer
/>
</mx:horizontalAxisRenderers
Ïà¹ØÎĵµ£º
ÓÃFLEXÀ´¿ª·¢Ó¦ÓÃÄÑÃâ²»ÁËҪʹÓõ½Module£¬FLEX×é¼þÌṩÁËModuleLoader×é¼þ£¬¸Ã×é¼þʹÓ÷½Ê½ÀàËÆÓëswfLoader£¬µ«ÊÇͨ³£½ö½öʹÓøÃ×é¼þ²¢²»ÄÜÂú×ãÎÒÃǵÄÐèÇó£¬ÕâʱFLEXΪÎÒÃÇÌṩÁËModuleManager£¬¿ÉÒÔʵÏÖ¶¯Ì¬µÄÔØÈ벻ͬµÄÄ£¿é¡£
module·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇÍêÕûµÄ£¬Ò»ÖÖÊǹØÁªµ½Ö÷³ÌÐòµÄ£¬ÔÚн¨Moduleʱ¿ÉÒÔÑ¡Ôñmodule swf s ......
±¾ÀýÖн«ÊµÏÖµ±Ó¦ÓÃÔËÐÐʱ²»½øÐÐÈκβÙ×÷¾ÍÏȵ¯³ö´°¿Ú£¬µã»÷¹Ø±Õ/µã»÷´°¿ÚÈÎһλÖà ʱ½«¹Ø±Õ´°¿Ú
1£©´´½¨Component—DefaultWin.mxml £¨Ä¿Â¼½á¹¹src/components/DefaultWin.mxml£©
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
  ......
firefoxϵ±flashÉèÖòÎÊý wmode Ϊ transparent »òÕß Opaque ʱºòÎı¾¿òÖÐÊäÈëÖÐÎÄ»á³öÏÖÎÊÌâ¡£
µÍ°æ±¾µÄfirefoxÖÐÎÞ·¨ÊäÈëÖÐÎÄ£¬¸ß°æ±¾ÖÐÔò³öÏÖÂÒÂë¡£
ÂÒÂëÓëflashºÍÒ³Ãæ±àÂ뷽ʽ¶¼Ã»ÓйØϵ£¬ÊÇfirefoxµÄbugÔì³ÉµÄ¡£
½â¾ö·½·¨Ö»ÓÐʹÓÃwmodeµÄĬÈÏÖµ£¬µ«ÊÇÕâÑùʹµÃflashÔÚÕû¸öÒ³ÃæµÄ×îÉϲ㣬divµÈ¶¼»á±»ÆäÕÚµ²×¡¡£
¼Ç ......
£¨1£©treeµã»÷ʼþpublic function handleList(ev:ResultEvent)
{
sourceList=ev.result as ArrayCollection;
}
private function tree_itemClick(evt:ListEvent):void {
var item:Object = Tree(evt.currentTarget).selectedItem;
if (pmtree.dataDescriptor.isBranch(item)) {
......