Đang chuẩn bị liên kết để tải về tài liệu:
Flash Builder 4 and Flex 4 Bible- P15
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Flash Builder 4 and Flex 4 Bible- P15: When Macromedia first released Flash MX in 2002, the product was branded as the new way to build Rich Internet Applications (known by the acronym RIA). The term was invented at Macromedia to describe a new class of applications that would offer the benefits of being connected to the Internet, including access to various types of Web-based services, but would solve many of the nagging issues that had been inherent in browser-based applications since the mid-1990s | Chapter 21 Using the Flex Charting Controls The application in Listing 21.8 displays a line chart and an area chart using the same data. LISTING 21.8 Line and area charts 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 s layout s HorizontalLayout verticalAlign middle paddingTop 20 paddingBottom 20 paddingRight 20 paddingLeft 20 s layout fx Declarations fx Model id trendModel source data trendData.xml s ArrayCollection id trendData source trendModel.row fx Declarations s Panel title Line Chart height 100 width 100 mx LineChart dataProvider trendData height 100 width 100 mx horizontalAxis mx CategoryAxis dataProvider trendData categoryField quarter mx horizontalAxis mx series mx LineSeries xField quarter yField sales mx series mx LineChart s Panel s Panel title Area Chart height 100 width 100 mx AreaChart dataProvider trendData height 100 width 100 mx horizontalAxis mx CategoryAxis dataProvider trendData categoryField quarter mx horizontalAxis mx series mx AreaSeries xField quarter yField sales mx series mx AreaChart s Panel s Application On the Web The application in Listing 21.8 is available in the Web site files as LineAndAreaDemo.mxml in the chapter2 0 project. 671 Part III Working with Data Both the LineSeries and AreaSeries components can adjust the shape of their lines based on their form property. As displayed in Figure 21.13 the form property has these possible values curve. Draws curves between data points. horizontal. Draws vertical lines from the x coordinate of the current point to the x coordinate of the next point. reverseStep. Draws vertical and then horizontal lines to connect data points. segment the default . Draws straight lines to connect data points. step. Draws horizontal and then vertical lines to connect data points. vertical. Draws vertical lines from the y coordinate of the current point to the y coordinate of the next point. .