| Package | com.amcharts |
| Class | public class AmXYChart |
| Inheritance | AmXYChart AmRectangularChart AmCoordinateChart AmChart mx.core.UIComponent |
| Property | Defined by | ||
|---|---|---|---|
![]() | autoMargins : Boolean
Specifies if margins of a chart where axes are will be calculated automatically by the maximum width of a axis label.
| AmRectangularChart | |
![]() | balloon : AmBalloon
An instance of com.amcharts.AmBalloon.
| AmChart | |
![]() | chartCursor : ChartCursor
Chart cursor.
| AmRectangularChart | |
![]() | chartScrollbar : ChartScrollbar
Chart scrollbar.
| AmRectangularChart | |
![]() | chartType : String
returns chart type (serial, xy, or radar).
| AmCoordinateChart | |
![]() | clipContent : Boolean
Specifies if the chart contents which goes outside the chart area should be clipped or not.
| AmChart | |
![]() | dataProvider : Object
Specifies the data provider for the chart.
| AmChart | |
![]() | graphs : Array
The array of graphs belonging to this chart.
| AmCoordinateChart | |
![]() | legend : AmLegend
Chart legend.
| AmChart | |
| maxZoomFactor : Number
Maximum zoom factor.
| AmXYChart | ||
![]() | mouseWheelEnabled : Boolean
Specifies if zooming/scrolling with mouse wheel is enabled.
| AmRectangularChart | |
![]() | numberFormatter : NumberFormatter
An instance of mx.formatters.NumberFormatter.
| AmChart | |
![]() | percentFormatter : NumberFormatter
An instance of mx.formatters.NumberFormatter.
| AmChart | |
![]() | prefixesOfBigNumbers : Array
Array of objects with prefixes for big numbers.
| AmChart | |
![]() | prefixesOfSmallNumbers : Array
Array of objects with prefixes for small numbers.
| AmChart | |
![]() | trendLines : Array
Array of trend lines.
| AmRectangularChart | |
![]() | urlTarget : String
The target of the url.
| AmCoordinateChart | |
![]() | usePrefixes : Boolean
If true, prefixes will be used for big and small numbers.
| AmChart | |
![]() | valueAxes : Array
The array of value axes.
| AmCoordinateChart | |
![]() | zoomOutButton : Object
Zoom-out button, visible when chart is zoomed-in.
| AmRectangularChart | |
![]() | zoomOutText : String
Text in the zoom-out button.
| AmRectangularChart | |
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| AmXYChart | ||
![]() |
Adds a graph (series) to the chart.
| AmCoordinateChart | |
![]() |
Adds a trend line to the chart.
| AmRectangularChart | |
![]() |
Adds value axis to the chart.
| AmCoordinateChart | |
![]() |
animateAgain():void
The animation is played only once or if you change the animation styles.
| AmCoordinateChart | |
![]() |
destroyAllListeners():void
Destorys all listeners.
| AmRectangularChart | |
![]() |
getGraphById(id:String):AmGraph
Returns graph by id.
| AmCoordinateChart | |
![]() |
getValueAxisById(id:String):ValueAxis
Returns value Axis by id.
| AmCoordinateChart | |
![]() |
Hide the graph (if it is visible).
| AmCoordinateChart | |
![]() |
hideGraphsBalloon(graph:AmGraph):void
Hide value balloon of a graph.
| AmCoordinateChart | |
![]() |
highlightGraph(graph:AmGraph):void
Highlight the graph.
| AmCoordinateChart | |
![]() |
invalidateData():void
In case data inside your dataProvider was changed, you can call this
method to rebuild the chart.
| AmChart | |
![]() |
invalidateMargins():void
Makes the chart to recalculate margin width and redraw.
| AmRectangularChart | |
![]() |
removeChartCursor():void
Removes cursor from the chart.
| AmRectangularChart | |
![]() |
removeChartScrollbar():void
Removes scrollbar from the chart.
| AmRectangularChart | |
![]() |
removeGraph(graph:AmGraph):void
Removes graph from the chart.
| AmCoordinateChart | |
![]() |
removeTrendLine(trendLine:TrendLine):void
Removes trend line from the chart.
| AmRectangularChart | |
![]() |
removeValueAxis(valueAxis:ValueAxis):void
Removes value axis from the chart.
| AmCoordinateChart | |
![]() |
Show the graph (if it is hidden).
| AmCoordinateChart | |
![]() |
showGraphsBalloon(graph:AmGraph):void
Show value balloon of a graph.
| AmCoordinateChart | |
![]() |
unhighlightGraph():void
UnhighlightGraph the graph.
| AmCoordinateChart | |
|
zoomOut():void
Zooms out the chart.
| AmXYChart | ||
| maxZoomFactor | property |
maxZoomFactor:Number [read-write]Maximum zoom factor.
The default value is 20.
public function get maxZoomFactor():Number
public function set maxZoomFactor(value:Number):void
| AmXYChart | () | constructor |
public function AmXYChart()Constructor.
| zoomOut | () | method |
public function zoomOut():voidZooms out the chart.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:amcharts="http://www.amcharts.com/com_internal"
layout="absolute"
backgroundColor="#FFFFFF"
width="100%"
height="100%" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]private var chartData:ArrayCollection = new ArrayCollection([
{x:6, y:5, value:15},
{x:10, y:2.9, value:19},
{x:5, y:8.0, value:5},
{x:9, y:1.6, value:13},
{x:2, y:6.2, value:22},
{x:5, y:9.4, value:15},
{x:11, y:2.2, value:8}
]);
]]>
</mx:Script>
<amcharts:AmXYChart
width="100%"
height="100%"
id="chart"
dataProvider="{chartData}"
startDuration="1">
<amcharts:graphs>
<amcharts:AmGraph
id="g0"
xField="x"
yField="y"
valueField="value"
lineAlpha="0"
bullet="bubble"
itemColors="[0xFF6600,0xFCD202,0xB0DE09,0x0D8ECF,0x2A0CD0,0xCD0D74,0xCC0000]"/>
</amcharts:graphs>
<amcharts:chartCursor>
<amcharts:ChartCursor>
</amcharts:ChartCursor>
</amcharts:chartCursor>
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar hideResizeGrips="false" height="20">
</amcharts:ChartScrollbar>
</amcharts:chartScrollbar>
</amcharts:AmXYChart>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:amcharts="http://www.amcharts.com/com_internal"
layout="absolute"
backgroundColor="#FFFFFF"
width="100%"
height="100%" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]private var chartData:ArrayCollection = new ArrayCollection([
// bubbles
{x:6, y:5, value:15},
{x:10, y:2.9, value:19},
{x:5, y:8.0, value:5},
{x:-9, y:-1.6, value:13},
{x:-2, y:-6.2, value:22},
{x:5, y:9.4, value:15},
{x:11, y:2.2, value:8},
{x:-10, y:-7.2, value:4},
{x:-7, y:-5.2, value:9},
{x:2, y:5.9, value:2},
{x:-10, y:-11.2, value:20},
// positive rectangle
{px:0, py: 0},
{px:0, py: 100},
{px:100, py: 100},
{px:100, py: 0},
{px:0, py: 0},
// negative rectangle
{nx:0, ny: 0},
{nx:0, ny: -100},
{nx:-100, ny: -100},
{nx:-100, ny: 0},
{nx:0, ny: 0},
]);
]]>
</mx:Script>
<amcharts:AmXYChart
width="100%"
height="100%"
id="chart"
autoMargins="false"
marginTop="0"
marginRight="0"
marginLeft="0"
marginBottom="0"
dataProvider="{chartData}">
<amcharts:graphs>
<!-- bubble graph -->
<amcharts:AmGraph
lineColor="0xFFCC00"
xField="x"
yField="y"
valueField="value"
lineAlpha="0"
bullet="bubble"
balloonText="x:[[x]] y:[[y]] value:[[value]]"
/>
<!-- positive rectangle -->
<amcharts:AmGraph
xField="px"
yField="py"
lineColor="0xCC3333"
lineAlpha="0"
fillAlphas="[0.5]"
includeInMinMax="false"/>
<!-- negative rectangle -->
<amcharts:AmGraph
xField="nx"
yField="ny"
lineColor="0x0066CC"
lineAlpha="0"
fillAlphas="[0.5]"
includeInMinMax="false"/>
</amcharts:graphs>
<amcharts:valueAxes>
<amcharts:ValueAxis position="bottom" inside="true" tickLength="0" labelsEnabled="false"/>
<amcharts:ValueAxis position="left" inside="true" tickLength="0" labelsEnabled="false"/>
</amcharts:valueAxes>
<amcharts:chartCursor>
<amcharts:ChartCursor>
</amcharts:ChartCursor>
</amcharts:chartCursor>
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar height="20">
</amcharts:ChartScrollbar>
</amcharts:chartScrollbar>
</amcharts:AmXYChart>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:amcharts="http://www.amcharts.com/com_internal"
layout="absolute"
backgroundColor="#FFFFFF"
width="100%"
height="100%" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var chartData:ArrayCollection = new ArrayCollection([
// scatter points
{ax:1, ay:0.5, bx:1, by:2.2},
{ax:2, ay:1.3, bx:2, by:4.9},
{ax:3, ay:2.3, bx:3, by:5.1},
{ax:4, ay:2.8, bx:4, by:5.3},
{ax:5, ay:3.5, bx:5, by:6.1},
{ax:6, ay:5.1, bx:6, by:8.3},
{ax:7, ay:6.7, bx:7, by:10.5},
{ax:8, ay:8.0, bx:8, by:12.3},
{ax:9, ay:8.9, bx:9, by:14.5},
{ax:10, ay:9.7, bx:10, by:15.0},
{ax:11, ay:10.4, bx:11, by:18.8},
{ax:12, ay:11.7, bx:12, by:19.0},
// trend graphs
{agx:12, agy:11, bgx:12, bgy:19},
{agx:1, agy:1, bgx:1, bgy:2}
]);
]]>
</mx:Script>
<amcharts:AmXYChart
width="100%"
height="100%"
id="chart"
dataProvider="{chartData}"
startDuration="1">
<amcharts:graphs>
<amcharts:AmGraph balloonText="x:[[x]] y:[[y]]" xField="ax" yField="ay" lineAlpha="0" bullet="triangleDown"/>
<amcharts:AmGraph balloonText="x:[[x]] y:[[y]]" xField="bx" yField="by" lineAlpha="0" bullet="square"/>
<amcharts:AmGraph balloonText="x:[[x]] y:[[y]]" xField="agx" yField="agy" lineThickness="2" lineColor="0xFF6600"/>
<amcharts:AmGraph balloonText="x:[[x]] y:[[y]]" xField="bgx" yField="bgy" lineThickness="2" lineColor="0xFCD202"/>
</amcharts:graphs>
<amcharts:valueAxes>
<amcharts:ValueAxis position="left" gridCount="20" labelFrequency="2"/>
<amcharts:ValueAxis position="bottom" gridCount="20"/>
</amcharts:valueAxes>
<amcharts:chartCursor>
<amcharts:ChartCursor>
</amcharts:ChartCursor>
</amcharts:chartCursor>
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar hideResizeGrips="false" height="20">
</amcharts:ChartScrollbar>
</amcharts:chartScrollbar>
</amcharts:AmXYChart>
</mx:Application>