带曲线阴影
<?xml version="1.0"?> <!-- http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/ --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Script> <!--[CDATA[ private function init(evt:Event):void { var chart:LineChart = evt.currentTarget as LineChart; seriesFilterArr = chart.seriesFilters; } private function checkBox_click(evt:MouseEvent):void { var len:uint = lineChart.seriesFilters.length; if (len > 0) { lineChart.seriesFilters = []; } else { lineChart.seriesFilters = seriesFilterArr; } } ]]--> </mx:Script> <mx:XMLListCollection id="dp"> <mx:source> <mx:XMLList> <quote date="8/27/2007" open="40.38" close="40.81" /> <quote date="8/24/2007" open="40.5" close="40.41" /> <quote date="8/23/2007" open="40.82" close="40.6" /> <quote date="8/22/2007" open="40.4" close="40.77" /> <quote date="8/21/2007" open="40.41" close="40.13" /> <quote date="8/20/2007" open="40.55" close="40.74" /> <quote date="8/17/2007" open="40.18" close="40.32" /> <quote date="8/16/2007" open="39.83" close="39.96" /> <quote date="8/15/2007" open="40.22" close="40.18" /> <quote date="8/14/2007" open="41.01" close="40.41" /> <quote date="8/13/2007" open="41" close="40.83" /> <quote date="8/10/2007" open="41.3" close="41.06" /> <quote date="8/9/2007" open="39.9" close="40.75" /> <quote date="8/8/2007" open="39.61" close="40.23" /> <quote date="8/7/2007" open="39.08" close="39.42" /> <quote date="8/6/2007" open="38.71" close="39.38" /> <quote date="8/3/2007" open="39.47" close="38.75" /> <quote date="8/2/2007" open="39.4" close="39.52" /> <quote date="8/1/2007" open="40.29" close="39.58" /> </mx:XMLList> </mx:source> </mx:XMLListCollection> <mx:Array id="seriesFilterArr" /> <mx:ApplicationControlBar dock="true"> <mx:CheckBox id="checkBox" label="toggle series filters:" labelPlacement="left" click="checkBox_click(event);" /> </mx:ApplicationControlBar> <mx:LineChart id="lineChart" showDataTips="true" dataProvider="{dp}" width="100%" height="100%" creationComplete="init(event);"> <!-- vertical axis --> <mx:verticalAxis> <mx:LinearAxis baseAtZero="false" title="Price" /> </mx:verticalAxis> <!-- horizontal axis --> <mx:horizontalAxis> <mx:CategoryAxis id="ca" categoryField="@date" title="Date" /> </mx:horizontalAxis> <!-- horizontal axis renderer --> <mx:horizontalAxisRenderers> <mx:AxisRenderer axis="{ca}" canDropLabels="true" /> </mx:horizontalAxisRenderers> <!-- series --> <mx:series> <mx:LineSeries yField="@close" form="curve" displayName="Close" /> <mx:LineSeries yField="@open" form="curve" displayName="Open" /> </mx:series> </mx:LineChart> </mx:Application>
隐藏
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <!--[CDATA[ import mx.collections.ArrayCollection; [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [ { Country: "USA", Gold: 35, Silver:39,Bronze:66,Bronze1:44 }, { Country: "China", Gold: 32, Silver:17,Bronze:47,Bronze1:97 }, { Country: "Russia", Gold: 27, Silver:27,Bronze:33,Bronze1:45 } ]); private function leftclick(event:MouseEvent):void{ first1.visible=!first1.visible; first2.visible=!first2.visible; first3.visible=!first3.visible; } private function rightclick(event:MouseEvent):void{ second1.visible=!second1.visible; second2.visible=!second2.visible; second3.visible=!second3.visible; } ]]--> </mx:Script> <mx:LineChart id="LineChart" dataProvider="{medalsAC}" showDataTips="true" width="500" height="300" y="58" x="0"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Country" /> </mx:horizontalAxis> <mx:series> <mx:LineSeries id="first1" verticalAxis="{firstVAxis}" displayName="左边1" yField="Gold" itemRenderer="mx.charts.renderers.CircleItemRenderer"> </mx:LineSeries> <mx:LineSeries id="first2" verticalAxis="{firstVAxis}" yField="Silver" displayName="左边2" itemRenderer="mx.charts.renderers.CircleItemRenderer"> </mx:LineSeries> <mx:LineSeries id="second1" verticalAxis="{secondVAxis}" yField="Bronze" displayName="右边1" itemRenderer="mx.charts.renderers.CircleItemRenderer"> </mx:LineSeries> <mx:LineSeries id="second2" verticalAxis="{secondVAxis}" yField="Bronze1" displayName="右边2" itemRenderer="mx.charts.renderers.CircleItemRenderer"> </mx:LineSeries> </mx:series> <mx:verticalAxisRenderers> <mx:AxisRenderer placement="left" color="#FF0000" id="first3" > <mx:axis> <mx:LinearAxis title="" baseAtZero="true" id="firstVAxis"/> </mx:axis> </mx:AxisRenderer> <mx:AxisRenderer placement="right" color="#FFFF00" id="second3"> <mx:axis> <mx:LinearAxis title="" baseAtZero="true" id="secondVAxis"/> </mx:axis> </mx:AxisRenderer> </mx:verticalAxisRenderers> </mx:LineChart> <mx:Button x="286" y="448" label="隐藏左边" click="leftclick(event)" fontSize="12"/> <mx:Button x="396" y="448" label="隐藏右边" click="rightclick(event)" fontSize="12"/> </mx:Application>
普通
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <!--ActionScript--> <mx:Script> <!--[CDATA[ import mx.collections.ArrayCollection; [Bindable] //数组:expenses public var expenses:ArrayCollection=new ArrayCollection ([ {Month: "Jan", Profit: 500, Expenses: 400, Amount: 45 }, {Month: "Feb", Profit: 400, Expenses: 200, Amount: 60 }, {Month: "Mar", Profit: 600, Expenses: 300, Amount: 30 }, {Month: "Apr", Profit: 800, Expenses: 400, Amount: 90}, {Month: "May", Profit: 900, Expenses: 400, Amount: 90}, {Month: "Jun", Profit: 1100, Expenses: 1000, Amount: 100} ]); ]]--> </mx:Script> <!--Panel--> <mx:Panel title="fifi" height="100%" width="100%" layout="horizontal" fontSize="12"> <!--LineChart(showDataTips:自动提示tip)--> <mx:LineChart id="myChart" dataProvider="{expenses}" showDataTips="true"> <!--categoryField:指定包含标签文本的数据提供程序的字段--> <mx:horizontalAxis> <mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"/> </mx:horizontalAxis> <!--yField:纵坐标数据节点--> <mx:series> <mx:LineSeries yField="Profit" displayName="收益"/> <mx:LineSeries yField="Expenses" displayName="开销"/> <mx:LineSeries yField="Amount" displayName="数量"/> </mx:series> </mx:LineChart> <!--Legend:一个图形标记和一个文本标签--> <mx:Legend dataProvider="{myChart}"/> </mx:Panel> </mx:Application>
介绍 (Introduction) UIComponent类是所有可视组件的基类,包括交互式和非交互式。 Class 声明 (Class Declaration) 以下是mx.core.UIComponent类的声明 - public class UIComponent extends FlexSprite implements IAutomationObject, IChild
flex-direction属性用于指定需要放置flex容器(flex-items)元素的方向。 usage - flex-direction: row | row-reverse | column | column-reverse 此属性接受四个值 - row - 从左到右水平排列容器的元素。 row-reverse - 从右到左水平排列容器的元素。 column - 从左到右垂直排列容器的元
要在应用程序中使用Flexbox,您需要使用display属性创建/定义Flex容器。 Usage - display: flex | inline-flex 此属性接受两个值 flex - 生成块级弹性容器。 inline-flex - 生成内联flex容器框。 现在,我们将看到如何使用display属性和示例。 Flex 将此值传递给display属性时,将创建块级Flex容器。 它占用父容
Flex Flex用于快速进行Flex布局 <div class="weui-flex"> <div class="weui-flex__item"><div class="placeholder">weui</div></div> </div> <div class="weui-flex"> <div class="weui-flex__item"><div class="pla
flex (fast lexical analyser generator) 是 Lex 的另一个替代品。它经常和自由软件 Bison 语法分析器生成器 一起使用。Flex 最初由 Vern Paxson 于 1987 年用C语言写成。 Flex 手册里对 Flex 描述如下: “flex 是一个生成扫描器的工具,能够识别文本中的词法模式。flex读入给定的输入文件,如果没有给定文件名的话,则从标
FLEX (Flipboard Explorer) 是 iOS 开发的应用内调试和探测工具集。运行的时候,FLEX 提供一个浮动在应用之上的工具栏,用户可以查看和修改应用的每一个地方。 调试利器: 检查和修改层次结构中的视图。 查看任何对象的属性和错误。 动态修改许多属性和错误。 动态调用实例和类方法。 查看详细的网络请求历史记录以及时间,标头和完整响应。 添加您自己的模拟器键盘快捷方式。 查看系
介绍 (Introduction) EventDispatcher类是分派事件的所有类的基类。 EventDispatcher类实现IEventDispatcher接口。 EventDispatcher类允许显示列表上的任何对象成为事件目标,因此,使用IEventDispatcher接口的方法。 为了理解EventDispatcher ,我们先来看看什么是事件和事件目标。 什么是事件? (What
flex-order属性用于定义flexbox项的顺序。 以下示例演示了order属性。 在这里,我们创建了六个彩色方框,标签分别为一个,两个,三个,四个,五个,六个,按相同的顺序排列,我们按照一,二,五,六,三,四的顺序对它们进行重新排序,使用flex-order属性。 <!doctype html> <html lang = "en"> <style> .box{