Important version information!

You are browsing a class reference for deprecated Version 2 of the JavaScript Charts.

Documentation for other versions: amCharts 4 (current) or amCharts 3.

ChartScrollbar

ChartScrollbar class displays chart scrollbar. Supported by AmSerialChart and AmXYChart.

Example of how scrollbar is added to the chart:

var chart = new AmCharts.AmSerialChart();
var chartScrollbar = new AmCharts.ChartScrollbar();
chart.addChartScrollbar(chartScrollbar);

Properties

PropertyTypeDefaultDescription
autoGridCountBooleanfalseSpecifies whether number of gridCount is specified automatically, acoarding to the axis size.
backgroundAlphaNumber1Background opacity.
backgroundColorString#D4D4D4Background color of the scrollbar.
categoryAxisCategoryAxisinstance of CategoryAxisRead-only. Category axis of the scrollbar.
colorString Text color. Will use chart's color if not set.
dragIconHeightNumber18Height of resize grip image. Note, you should also update the image in amcharts/images folder if you don't want it to be distorted because of resizing.
dragIconWidthNumber11Width of resize grip image. Note, you should also update the image in amcharts/images folder if you don't want it to be distorted because of resizing.
graphAmGraph Specifies which graph will be displayed in the scrollbar. Only Serial chart's scrollbar can display a graph.
graphFillAlphaNumber0.1Graph fill opacity. Value range is 0 - 1.
graphFillColorString#000000Graph fill color.
graphLineAlphaNumber0Graph line opacity. Value range is 0 - 1.
graphLineColorString#000000Graph line color.
graphTypeString 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. Possible values are: "line", "column", "step", "smoothedLine", "candlestick", "ohlc".
gridAlphaNumber0.7Grid opacity. Value range is 0 - 1.
gridColorString#FFFFFFGrid color.
gridCountNumber0The number of grid lines.
hideResizeGripsBooleanfalseSpecifies whether resize grips are hidden when mouse is away from the scrollbar.
maximumNumberMaximum value of ValueAxis of ChartScrollbar. Calculated automatically, of not set.
minimumNumberMinimum value of ValueAxis of ChartScrollbar. Calculated automatically, of not set.
resizeEnabledBooleantrueSpecifies whether scrollbar has a resize feature.
scrollbarHeightNumber20Height (width, if chart is rotated) of a scrollbar.
scrollDurationNumber2Duration of scrolling, when the user clicks on scrollbar's background, in seconds.
selectedBackgroundAlphaNumber1Selected backround opacity.
selectedBackgroundColorString#EFEFEFSelected background color.
selectedGraphFillAlphaNumber0.5Selected graph's fill opacity. Value range is 0 - 1.
selectedGraphFillColorString#000000Selected graph's fill color.
selectedGraphLineAlphaNumber0Selected graph's line opacity. Value range is 0 - 1.
selectedGraphLineColorString#000000Selected graph's line color.
updateOnReleaseOnlyBooleanfalseSpecifies if the chart should be updated while dragging/resizing the scrollbar or only at the moment when user releases mouse button.

Methods

ChartScrollbar class does not have any methods.

Events

ChartScrollbar class does not have any events.