Reputation: 264
Is this possible? Legends have this attribute (top/bottom), and amStockCharts
library has this configuration option as well. So, for the "regular" amCharts
library, is it possible to position the chartScrollbar on the bottom?
I want to avoid any CSS hacks after the chart draws as well.
Upvotes: 5
Views: 3386
Reputation: 589
You can achieve that by changing chart.scrollbarX.parent
value like this:
chart.scrollbarX.parent = chart.bottomAxesContainer;
Upvotes: 0
Reputation: 264
In the latest update to AmCharts, this has been added as a config option. You can set "oppositeAxis: false" on chartScrollbar properties to move the scrollbar to the bottom. Hope this can be helpful.
Upvotes: 3
Reputation: 49
I'm late but I didn't find a better solution elsewhere. You can use
chartScrollbar.oppositeAxis = false;
chartScrollbar.offset = 20;
This will push the scrollbar next to the categoryAxis. Use the offset to move the scrollbar away from the labels.
Upvotes: 0
Reputation: 6025
Position of a Scrollbar in our regular JavaScript charts is always opposite the axis. So you have to set categoryAxis.position = "top" in order scrollbar to be at the bottom.
Upvotes: 2