Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Possibility to add spacing between stacks of a stacked column in amCharts 5

$
0
0

I'm working on upgrading from amCharts 4 to amCharts 5. Previously in amCharts 4 it was easy to add a space between the individual stacks of a stacked column via template adapters like below

columnSeries.columns.template.column.adapter.add('paddingTop', () => 1);columnSeries.columns.template.column.adapter.add('paddingBottom', () => 1);

Example of spacing between column stacks in amCharts 4:working sample in amCharts 4

I could not find a solution the get the same behavior after upgrading to amCharts 5.

Since there is no paddingTop and paddingBottom anymore on the template I tried using the paddingTop and paddingBottom property on am5xy.ColumnSeries itself. Using a paddingTop results in shifting the whole stacked column downward while paddingBottom does not do anything. I've expected the paddings to work the same as the ones on the template itself in amCharts 4.

amCharts 5 stacked column series without padding applied:amCharts 5 without padding

same amCharts 5 stacked column series with a padding of 100px applied:amCharts 5 with padding

I've also tried adding adapters for paddingTop and paddingBottom and also using marginTop/marginBotton but still no effect.

Is there any other option to add a space between the stacked columns?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>