Flash charts Flex charts WPF & Silverlight charts Flash maps
amCharts Real flex components *
Home Home
Examples Examples
Download Download
Buy Buy
FAQ FAQ
Documentation Documentation
Support forum Support forum

Scrollable and zoomable chart

Scrolling and zooming
Any Cartesian chart made with our flex component can be zoomed-in and scrolled along category axis. If you check our other examples you will find scrollbars on quite a big part of them. The ones that aren't scrollable are this way because we just didn't enable scrolling on them, because sometimes, when you don't have a lot of data, it's just pointless. Note that our scrolling and zooming feature differs from most of the solutions offered on the market. We do not simply scroll the big chart image; we redraw the chart based on the selected data. This is much more advanced solution. Imagine that you have a chart where data has changed a lot during some time and the user zooms-in the period when values were very small comparing to the values of some other period. Using our charts the user can still get the normal chart of this selection. Of course, some people don't like when the chart changes min and max values when scrolling, this can be easily avoided by setting fixed min and max values for your value axis.

Zooming
You can zoom-in by selecting a part of the chart you are interested in with a mouse. Click anywhere in the plot area, move the mouse and you should see the selected area. Release the mouse button when you are happy with your selection. You can also zoom in using the scrollbar. Roll-over the grey scrollbar above the chart. Two drag-buttons will appear - you can drag them to change your selection. You can also zoom in or zoom out programmatically.

Scrolling
To scroll the chart, simply drag the thumb on the scrollbar. You can also click on the darker grey area of a scrollbar - the selection will move to the place you've clicked.

Position and colors
The position of a scrollbar is chosen automatically - it is on the opposite side to your category axis. If your chart is rotated, the scrollbar will be vertical. Check the second chart in this example to see what vertical scrollbar looks like. All the colors are adjustable to meet your design.

Graph inside the scrollbar
Your scrollbar can display a graph inside. Check this example to see how it looks. The graph in a scrollbar can be of any type supported by Cartesian chart component: line, column, step, smoothed line, candlestick and OHLC.

Scrolling and zooming the chart with mouse wheel
We've also added a possibility to scroll and zoom in the chart with mouse wheel. Zooming is made by pressing CTRL key and rolling the wheel. However there are some issues since AS3 was introduced - using mouse wheel over a flash object doesn't suppress browser's mouse wheel handling, so in cases like this, when a chart is in a web page, both chart and page will scroll. If you are using the components for building Air applications or web applications with disabled scrollbars (by default flex builder generates this kind of applications), you will be able to zoom and scroll the chart with mouse wheel without any problems.

view mxml source


amCharts Bundle Examples

  • Balloon with rounded corners
  • Bars with gradient fills
  • Bubble chart
  • Bulls eye chart
  • Candlestick and OHLC
  • Chart with legend
  • Chart with multiple value axes
  • Custom bullets
  • Data binding
  • Date based category axis
  • Guides as Areas
  • Negative colors
  • Polar chart
  • Radar chart
  • Regular category axis
  • Rotated axis labels
  • Save chart as image
  • Scatter chart
  • Scrollable and zoomable chart
  • Stacked 3D column chart
  • Stacked area chart
  • Stacked bar chart
  • Simple pie chart
  • amStock Examples

  • Stock chart example
  • Adding and removing stock panels
  • Stock events
  • © amCharts | About us | Contact and feedback: info@amcharts.com Subscribe to amcharts news feed by e-mail or RSS reader Follow amCharts on Twitter * Not just a wrapper ;)