| Package | com.amcharts.chartClasses |
| Class | public class ChartScrollbar |
| Inheritance | ChartScrollbar SimpleChartScrollbar mx.core.UIComponent |
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar/>
</amcharts:chartScrollbar>
| Property | Defined by | ||
|---|---|---|---|
| categoryAxis : CategoryAxis
[read-only]
Returns CategoryAxis object of scrollbar
| ChartScrollbar | ||
| graph : AmGraph
[write-only]
Specifies which graph will be displayed in the scrollbar.
| ChartScrollbar | ||
| graphType : String
Type of a scrollbar's graph.
| ChartScrollbar | ||
| mouseWheelStep : Number
By default, if scrolling with mouse wheel is enabled, the scrollbar moves by one minPeriod when mouse wheel is turned.
| ChartScrollbar | ||
![]() | updateOnReleaseOnly : Boolean
Specifies if the chart should be updated while dragging/resizing the scrollbar or only at the moment when user releases mouse button.
| SimpleChartScrollbar | |
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| ChartScrollbar | ||
| Style | Description | Defined by | ||
|---|---|---|---|---|
|
autoGridCount
| Type: Boolean CSS Inheritance: no Specifies whether number of gridCount is specified automatically, acoarding to the axis size. The default value is false. | ChartScrollbar | ||
![]() | Type: Number CSS Inheritance: no Background opacity. | SimpleChartScrollbar | ||
![]() | Type: uint Format: Color CSS Inheritance: no Background color of the scrollbar. | SimpleChartScrollbar | ||
|
color
| Type: uint Format: Color CSS Inheritance: yes Color of text in the component, including the component label. The default value is 0x0B333C. | ChartScrollbar | ||
|
disabledColor
| Type: uint Format: Color CSS Inheritance: yes Color of text in the component if it is disabled. The default value is 0xAAB3B3. | ChartScrollbar | ||
|
fontAntiAliasType
| Type: String CSS Inheritance: yes Sets the antiAliasType property of internal TextFields. The possible values are
"normal" (flash.text.AntiAliasType.NORMAL)
and "advanced" (flash.text.AntiAliasType.ADVANCED).
The default value is This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you cannot apply it to some characters and not others. The default value is"advanced". | ChartScrollbar | ||
|
fontFamily
| Type: String CSS Inheritance: yes Name of the font to use. Unlike in a full CSS implementation, comma-separated lists are not supported. You can use any font family name. If you specify a generic font name, it is converted to an appropriate device font. The default value is "Verdana". | ChartScrollbar | ||
|
fontGridFitType
| Type: String CSS Inheritance: yes Sets the gridFitType property of internal TextFields that represent text in Flex controls.
The possible values are "none" (flash.text.GridFitType.NONE),
"pixel" (flash.text.GridFitType.PIXEL),
and "subpixel" (flash.text.GridFitType.SUBPIXEL).
This property only applies when you are using an embedded font
and the This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. The default value is"pixel". | ChartScrollbar | ||
|
fontSharpness
| Type: Number CSS Inheritance: yes Sets the sharpness property of internal TextFields that represent text in Flex controls.
This property specifies the sharpness of the glyph edges. The possible values are Numbers
from -400 through 400.
This property only applies when you are using an embedded font
and the This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. The default value is0. | ChartScrollbar | ||
|
fontSize
| Type: Number Format: Length CSS Inheritance: yes Height of the text, in pixels. The default value is 10 for all controls except the ColorPicker control. For the ColorPicker control, the default value is 11. | ChartScrollbar | ||
|
fontStyle
| Type: String CSS Inheritance: yes Determines whether the text is italic font. Recognized values are "normal" and "italic".
The default value is "normal". | ChartScrollbar | ||
|
fontThickness
| Type: Number CSS Inheritance: yes Sets the thickness property of internal TextFields that represent text in Flex controls.
This property specifies the thickness of the glyph edges.
The possible values are Numbers from -200 to 200.
This property only applies when you are using an embedded font
and the This style has no effect on system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. The default value is0. | ChartScrollbar | ||
|
fontWeight
| Type: String CSS Inheritance: yes Determines whether the text is boldface. Recognized values are normal and bold.
The default value for Button controls is bold.
The default value for all other controls is normal.
| ChartScrollbar | ||
|
graphFillAlpha
| Type: Number CSS Inheritance: no Graph fill opacity. The default value is 0.1. | ChartScrollbar | ||
|
graphFillColor
| Type: uint Format: Color CSS Inheritance: no Graph fill color. The default value is 0x000000. | ChartScrollbar | ||
|
graphLineAlpha
| Type: Number CSS Inheritance: no Graph line opacity. The default value is 0. | ChartScrollbar | ||
|
graphLineColor
| Type: uint Format: Color CSS Inheritance: no Graph line color. The default value is 0x000000. | ChartScrollbar | ||
|
gridAlpha
| Type: Number CSS Inheritance: no grid opacity The default value is 0.7. | ChartScrollbar | ||
|
gridColor
| Type: Number CSS Inheritance: no grid color The default value is 0xFFFFFF. | ChartScrollbar | ||
|
gridCount
| Type: Number CSS Inheritance: no grid count The default value is 0. | ChartScrollbar | ||
![]() | Type: Boolean CSS Inheritance: no Specifies whether resize grips are hidden when mouse is away from the scrollbar. | SimpleChartScrollbar | ||
|
kerning
| Type: Boolean CSS Inheritance: yes A Boolean value that indicates whether kerning is enabled ( true) or disabled (false).
Kerning adjusts the gap between certain character pairs
to improve readability, and should be used only when necessary,
such as with headings in large fonts.
Kerning is supported for embedded fonts only.
Certain fonts, such as Verdana, and monospaced fonts,
such as Courier New, do not support kerning.
The default value is false. | ChartScrollbar | ||
|
letterSpacing
| Type: Number CSS Inheritance: yes The number of additional pixels to appear between each character. A positive value increases the character spacing beyond the normal spacing, while a negative value decreases it. The default value is 0. | ChartScrollbar | ||
![]() | Type: Boolean CSS Inheritance: no Specifies whether scrollbar has a resize feature. | SimpleChartScrollbar | ||
![]() | Type: Number CSS Inheritance: no Duration of scrolling, when the user clicks on scrollbar's background, in seconds. | SimpleChartScrollbar | ||
![]() | Type: Number CSS Inheritance: no Selected backround opacity. | SimpleChartScrollbar | ||
![]() | Type: uint Format: Color CSS Inheritance: no Selected background color. | SimpleChartScrollbar | ||
|
selectedGraphFillAlpha
| Type: Number CSS Inheritance: no Selected graph's fill opacity. The default value is 0.5. | ChartScrollbar | ||
|
selectedGraphFillColor
| Type: uint Format: Color CSS Inheritance: no Selected graph's fill color. The default value is 0x000000. | ChartScrollbar | ||
|
selectedGraphLineAlpha
| Type: Number CSS Inheritance: no Selected graph's line opacity. The default value is 0. | ChartScrollbar | ||
|
selectedGraphLineColor
| Type: uint Format: Color CSS Inheritance: no Selected graph's line color. The default value is 0x000000. | ChartScrollbar | ||
|
textAlign
| Type: String CSS Inheritance: yes Alignment of text within a container. Possible values are "left", "right",
or "center".
The default value for most components is | ChartScrollbar | ||
|
textDecoration
| Type: String CSS Inheritance: yes Determines whether the text is underlined. Possible values are "none" and "underline".
The default value is "none". | ChartScrollbar | ||
|
textIndent
| Type: Number Format: Length CSS Inheritance: yes Offset of first line of text from the left side of the container, in pixels. The default value is 0. | ChartScrollbar | ||
| categoryAxis | property |
categoryAxis:CategoryAxis [read-only]Returns CategoryAxis object of scrollbar
Implementation public function get categoryAxis():CategoryAxis
| graph | property |
graph:AmGraph [write-only]Specifies which graph will be displayed in the scrollbar. XY Chart can not display graphs in the scrollbar.
Implementation public function set graph(value:AmGraph):void
| graphType | property |
graphType:String [read-write]Type of a scrollbar's graph. By default the graph type is the same as the original graph's type, however in case of candlestick or ohlc you might want to show line graph in the scrollbar.
The default value is undefined.
public function get graphType():String
public function set graphType(value:String):void
| mouseWheelStep | property |
mouseWheelStep:Number [read-write]By default, if scrolling with mouse wheel is enabled, the scrollbar moves by one minPeriod when mouse wheel is turned. if you want to change this you can set mouseWheelStep here (in milliseconds).
Implementation public function get mouseWheelStep():Number
public function set mouseWheelStep(value:Number):void
| ChartScrollbar | () | constructor |
public function ChartScrollbar()Constructor.
<?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"
creationComplete="{generateChartData()}"
width="100%"
height="100%" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.amcharts.chartClasses.AmGraph;
import mx.collections.ArrayCollection;
[Bindable]private var chartData:ArrayCollection = new ArrayCollection();
// generate some random data, quite different range
private function generateChartData():void{
var firstDate:Date = new Date();
firstDate.setDate(firstDate.getDate() - 100);
for(var i:Number = 0; i < 100; i++){
var newDate:Date = new Date(firstDate);
newDate.setDate(newDate.getDate() + i);
var visits:Number = Math.round(Math.random() * 40) + 100;
var hits:Number = Math.round(Math.random() * 80) + 500;
var views:Number = Math.round(Math.random() * 6000);
chartData.addItem({date:newDate, visits:visits, hits:hits, views:views});
}
}
private function zoom():void{
chart.zoomToIndexes(0,20);
}
private var _newValueAxis:ValueAxis;
private function addValueAxis():void{
_newValueAxis = new ValueAxis();
_newValueAxis.offset = 50;
_newValueAxis.setStyle("gridAlpha", 0);
_newValueAxis.setStyle("axisColor", 0xB0DE09);
_newValueAxis.setStyle("axisThickness", 2);
chart.addValueAxis(_newValueAxis);
var graph:AmGraph = new AmGraph();
graph.valueField = "views";
graph.setStyle("bullet", "triangleUp");
graph.setStyle("hideBulletsCount", 30);
graph.type = "smoothedLine";
graph.valueAxis = _newValueAxis;
chart.addGraph(graph);
addAxis.enabled = false;
removeAxis.enabled = true;
}
private function removeValueAxis():void{
chart.removeValueAxis(_newValueAxis);
addAxis.enabled = true;
removeAxis.enabled = false;
}
]]>
</mx:Script>
<mx:VBox width="100%" height="100%">
<amcharts:AmSerialChart
dataUpdated="{zoom()}"
id="chart"
width="100%"
height="100%"
dataProvider="{chartData}"
categoryField="date">
<amcharts:graphs>
<!-- In case you have more then one value axis, you should set valueAxis for the graph -->
<amcharts:AmGraph title="Visits" valueAxis="{v1}" valueField="visits" type="smoothedLine" bullet="round" hideBulletsCount="30"/>
<amcharts:AmGraph title="Visits" valueAxis="{v2}" valueField="hits" type="smoothedLine" bullet="square" hideBulletsCount="30"/>
</amcharts:graphs>
<!-- you can have any number of value axes. If you place value axes on the same side, you can move axis by setting "offset" property -->
<amcharts:valueAxes>
<amcharts:ValueAxis id="v1" axisColor="#FF6600" axisThickness="2"/>
<amcharts:ValueAxis id="v2" position="right" axisColor="#FCD202" gridAlpha="0" axisThickness="2"/>
</amcharts:valueAxes>
<amcharts:categoryAxis>
<amcharts:CategoryAxis parseDates="true" minPeriod="DD" gridCount="13"/>
</amcharts:categoryAxis>
<amcharts:chartCursor>
<amcharts:ChartCursor cursorPosition="mouse"/>
</amcharts:chartCursor>
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar height="15"/>
</amcharts:chartScrollbar>
</amcharts:AmSerialChart>
<mx:HBox>
<mx:Spacer width="35"/>
<mx:Button id="addAxis" label="add value axis" click="{addValueAxis()}"/>
<mx:Button enabled="false" id="removeAxis" label="remove value axis" click="{removeValueAxis()}"/>
</mx:HBox>
<mx:Spacer height="15"/>
</mx:VBox>
</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%"
creationComplete="{clearFilter()}" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]private var chartData:ArrayCollection = new ArrayCollection([
{year:"2000",a:20,b:5,c:10,d:5},
{year:"2001",a:21,b:6,c:10,d:10},
{year:"2002",a:24,b:7,c:9,d:10},
{year:"2003",a:21,b:5,c:10,d:8},
{year:"2004",a:24,b:4,c:10,d:8},
{year:"2005",a:26,b:8,c:10,d:9},
{year:"2006",a:27,b:9,c:12,d:9},
{year:"2007",a:29,b:9,c:13,d:8},
{year:"2008",a:30,b:10,c:14,d:7},
{year:"2009",a:26,b:12,c:15,d:8},
{year:"2010",a:24,b:11,c:13,d:9},
{year:"2011",a:22,b:14,c:11,d:8},
{year:"2012",a:21,b:16,c:11,d:7},
{year:"2013",a:20,b:17,c:13,d:6},
{year:"2014",a:15,b:19,c:13,d:5},
{year:"2015",a:14,b:18,c:14,d:3}
]);
private function zoom():void{
chart.zoomToIndexes(6,12);
}
private function clearFilter():void{
this.filters = [];
}
]]>
</mx:Script>
<mx:filters>
<flash.filters:BevelFilter id='bevelFilter' xmlns:flash.filters='flash.filters.*'
angle='60'
blurX='5' blurY='5'
distance='3'
highlightAlpha='0.39' highlightColor='#ffffff'
knockout='false' quality='1'
shadowAlpha='0.27' shadowColor='#000000' strength='1' type='inner'/>
</mx:filters>
<mx:HBox backgroundColor="#FFFFFF" width="100%" height="100%">
<mx:VBox width="100%" height="100%">
<amcharts:AmSerialChart
width="100%"
height="100%"
id="chart"
dataProvider="{chartData}"
categoryField="year"
plotAreaFillAlphas="[0]"
dataUpdated="{zoom()}">
<amcharts:graphs>
<amcharts:AmGraph
color="#FFFFFF"
title="Sample a"
valueField="a"
type="column"
lineAlpha="0.8"
fillAlphas="[0.8]"
showBalloon="false"
filters="{[bevelFilter]}"/>
<amcharts:AmGraph
color="#FFFFFF"
title="Sample b"
valueField="b"
type="column"
lineAlpha="0.8"
fillAlphas="[0.8]"
showBalloon="false"
filters="{[bevelFilter]}"/>
<amcharts:AmGraph
color="#FFFFFF"
title="Sample c"
valueField="c"
type="column"
lineAlpha="0.8"
fillAlphas="[0.8]"
showBalloon="false"
filters="{[bevelFilter]}"/>
<amcharts:AmGraph
color="#FFFFFF"
title="Sample d"
valueField="d"
type="column"
lineAlpha="0.8"
fillAlphas="[0.8]"
showBalloon="false"
filters="{[bevelFilter]}"/>
</amcharts:graphs>
<amcharts:valueAxes>
<amcharts:ValueAxis stackType="regular" gridAlpha="0.1"/>
</amcharts:valueAxes>
<amcharts:categoryAxis>
<amcharts:CategoryAxis gridPosition="start" gridAlpha="0.1" fontWeight="bold"/>
</amcharts:categoryAxis>
<amcharts:chartScrollbar>
<amcharts:ChartScrollbar hideResizeGrips="false" height="20"/>
</amcharts:chartScrollbar>
<amcharts:chartCursor>
<amcharts:ChartCursor cursorAlpha=".5"/>
</amcharts:chartCursor>
</amcharts:AmSerialChart>
<amcharts:AmLegend
fontWeight="bold"
dataProvider="{chart}"
width="100%" align="center"/>
</mx:VBox>
</mx:HBox>
</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>