(Preview)
Package | mx.charts.series |
Class | public class LineSeries |
Inheritance | LineSeries ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |

The <mx:LineSeries>
tag inherits all the properties
of its parent classes and adds the following properties:
<mx:LineSeries Properties fillFunction="Internal fill function" horizontalAxis="No default" interpolateValues="false|true" sortOnXField="false|true" verticalAxis="No default" xField="null" yField="null" Styles adjustedRadius="2" fill="0xFFFFFF" fills="IFill; no default" form="segment|curve|horizontal|reverseStep|step|vertical" itemRenderer="itemRenderer" legendMarkerRenderer="Defaults to series's itemRenderer" lineSegmentRenderer="ShadowLineRenderer" lineStroke="Stroke(0xE47801,3)" radius="4" stroke="IStroke; no default" />
More examples
Using the charting controls
About the series classes
Creating charts in ActionScript
Using line charts
Using multiple data series
Using multiple axes
Defining strokes for LineSeries and AreaSeries
Using fills with chart controls
Using per-item fills
About the series classes
Creating charts in ActionScript
Using line charts
Using multiple data series
Using multiple axes
Defining strokes for LineSeries and AreaSeries
Using fills with chart controls
Using per-item fills
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
![]() | accessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation)
for this InteractiveObject instance. | InteractiveObject | |
![]() | metaData : Object
Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the
the instance of this DisplayObject in the SWF file through a PlaceObject4 tag. | DisplayObject |
Protected Properties
Property | Defined By |
---|
Protected Methods
Method | Defined By |
---|
Styles
Styles are either common or associated with a specific theme. If the style is common, it can be used with any theme. If a style is associated with a specific theme, it can only be used if your application uses that theme.
Common Styles
Style | Description | Defined By | ||
---|---|---|---|---|
adjustedRadius | Type: Number Format: Length CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Specifies the number of pixels by which radius of the chart item is to be increased when highlighted or selected. The default value is 2 . | LineSeries | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance in pixels from the top edge of the content area to the control's baseline position. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance, in pixels, from the bottom edge of the component to the bottom edge of its parent container's content area. | UIComponent | ||
![]() | Type: uint Format: Color CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Color of the component highlight when validation fails. | UIComponent | ||
fill | Type: mx.graphics.IFill CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Sets the fill for this data series. You can specify either an object implementing the IFill interface, or a number representing a solid color value. You can also specify a solid fill using CSS. | LineSeries | ||
fills | Type: Array CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Specifies an Array of fill objects that define the fill for each item in the series. This takes precedence over the fill style property.
If a custom method is specified by the fillFunction property, that takes precedence over this Array.
If you do not provide enough Array elements for every item,
Flex repeats the fill from the beginning of the Array.
To set the value of this property using CSS: LineSeries { fills:#CC66FF, #9966CC, #9999CC; } To set the value of this property using MXML: <mx:LineSeries ... > <mx:fills> <mx:SolidColor color="0xCC66FF"/> <mx:SolidColor color="0x9966CC"/> <mx:SolidColor color="0x9999CC"/> </mx:fills> </mx:LineSeries>
If you specify the | LineSeries | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Blend mode used by the focus rectangle. | UIComponent | ||
![]() | Type: Class CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Skin used to draw the focus rectangle. | UIComponent | ||
![]() | Type: Number Format: Length CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Thickness, in pixels, of the focus rectangle outline. | UIComponent | ||
form | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Specifies the line type for the chart. Possible values are:
"segment" .
| LineSeries | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance in pixels from the center of the component's content area to the center of the component. | UIComponent | ||
![]() | Type: String CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 2.5 The primary interaction mode for this component. | UIComponent | ||
itemRenderer | Type: mx.core.IFactory CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 A factory that represents the class the series will use to represent individual items on the chart. This class is instantiated once for each element in the chart. Classes used as an itemRenderer should implement the IFlexDisplayObject, ISimpleStyleClient, and IDataRenderer interfaces. The data property is assigned the
chartItem that the skin instance renders.
| LineSeries | ||
![]() | Type: String CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.1 Runtime Versions: Flash10, AIR 1.5 Specifies the desired layout direction of a component. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance, in pixels, from the left edge of the component to the left edge of its parent container's content area. | UIComponent | ||
legendMarkerRenderer | Type: mx.core.IFactory CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The class that the series uses to render the series's marker in any associated legends. If this style is null , most series default to
using their itemRenderer as a legend marker skin instead. Classes used as legend markers should implement the IFlexDisplayObject interface, and optionally the ISimpleStyleClient and IDataRenderer interfaces.
If the class used as a legend marker implements the IDataRenderer interface, the data property is assigned a LegendData instance.
| LineSeries | ||
lineSegmentRenderer | Type: mx.core.IFactory CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 A factory that represents the class the series uses to represent the individual line segments in the series. This class is instantiated once for each distinct segment of the series. Classes used as lineSegmentRenderers should implement the IFlexDisplayObject, ISimpleStyleClient, and IDataRenderer interfaces. The data property is assigned an instance of
mx.charts.series.items.LineSeriesSegment
that describes the segment to render.
| LineSeries | ||
lineStroke | Type: mx.graphics.IStroke CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Sets the stroke for the actual line segments. The default value for a LineChart control is orange ( 0xE48701 ).
The default color for a LineSeries used in a CartesianChart control is black (0x000000 ).
The default value for the width is 3.
| LineSeries | ||
radius | Type: Number Format: Length CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Specifies the radius, in pixels, of the chart elements for the data points. This property applies only if you specify an item renderer using the itemRenderer property.
You can specify the itemRenderer in MXML or using styles.
The default value is 4 . | LineSeries | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance, in pixels, from the right edge of the component to the right edge of its parent container's content area. | UIComponent | ||
![]() | Type: Boolean CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 1.5 Show the error border or skin when this component is invalid | UIComponent | ||
![]() | Type: Boolean CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 1.5 Show the error tip when this component is invalid and the user rolls over it | UIComponent | ||
stroke | Type: mx.graphics.IStroke CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Sets the stroke style for this data series. You must specify a Stroke object to define the stroke. | LineSeries | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance, in pixels, from the top edge of the component to the top edge of its parent container's content area. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance in pixels from the center of the component's content area to the center of the component. | UIComponent |
Spark Theme Styles
Halo Theme Styles
Public Constants
Property Detail
Constructor Detail
Method Detail
Examples How to use this example
Line_AreaChartExample.mxml
<?xml version="1.0"?> <!-- Simple example to demonstrate the LineChart and AreaChart controls. --> <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"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var expensesAC:ArrayCollection = new ArrayCollection( [ { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 }, { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 }, { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 }, { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 }, { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]); ]]> </fx:Script> <fx:Declarations> <!-- Define custom colors for use as fills in the AreaChart control. --> <mx:SolidColor id="sc1" color="blue" alpha=".3"/> <mx:SolidColor id="sc2" color="red" alpha=".3"/> <mx:SolidColor id="sc3" color="green" alpha=".3"/> <!-- Define custom Strokes. --> <mx:SolidColorStroke id = "s1" color="blue" weight="2"/> <mx:SolidColorStroke id = "s2" color="red" weight="2"/> <mx:SolidColorStroke id = "s3" color="green" weight="2"/> </fx:Declarations> <mx:Panel title="LineChart and AreaChart Controls Example" height="100%" width="100%" layout="horizontal"> <mx:LineChart id="linechart" height="100%" width="45%" paddingLeft="5" paddingRight="5" showDataTips="true" dataProvider="{expensesAC}"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Month"/> </mx:horizontalAxis> <mx:series> <mx:LineSeries yField="Profit" form="curve" displayName="Profit" lineStroke="{s1}"/> <mx:LineSeries yField="Expenses" form="curve" displayName="Expenses" lineStroke="{s2}"/> <mx:LineSeries yField="Amount" form="curve" displayName="Amount" lineStroke="{s3}"/> </mx:series> </mx:LineChart> <mx:Legend dataProvider="{linechart}"/> <mx:AreaChart id="Areachart" height="100%" width="45%" paddingLeft="5" paddingRight="5" showDataTips="true" dataProvider="{expensesAC}"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Month"/> </mx:horizontalAxis> <mx:series> <mx:AreaSeries yField="Profit" form="curve" displayName="Profit" areaStroke="{s1}" areaFill="{sc1}"/> <mx:AreaSeries yField="Expenses" form="curve" displayName="Expenses" areaStroke="{s2}" areaFill="{sc2}"/> <mx:AreaSeries yField="Amount" form="curve" displayName="Amount" areaStroke="{s3}" areaFill="{sc3}"/> </mx:series> </mx:AreaChart> <mx:Legend dataProvider="{Areachart}"/> </mx:Panel> </s:Application>
Wed Nov 21 2018, 06:34 AM -08:00