How to add space between ColumnSeries in Flex / Flash ColumnChart?

I am using Flex ColumnChart with multiple ColumnSeries. I want to add a space between the columns / columns of ColumnSeries.

What I mean? If you look at Adobe LiveDocs for ColumnChart , I have a chart similar to the 1st chart. I want to add margin / padding between orange and green columns (not months).

alt text

I looked at LiveDocs and I can not find anything on it.

+4
source share
2 answers

you need to play with the y coordinate of the second series. I wrote you an example of how you can achieve to control the distance between several series. This is not perfect, but hopefully shows you the right way to do it;)

http://pastie.org/3327210

enter image description here

+1
source

Subclassing mx.charts.series.ColumnSet works fine for me (at least in 4.0 sdk)

public class TestColumnSet extends ColumnSet { public var intraSetMaxColumnWidth:Number = NaN; public var intraSetColumnWidthRatio:Number = NaN; override protected function customizeSeries(glyph:IChartElement,i:uint):void { super.customizeSeries(glyph, i); var currentSeries:IColumn = IColumn(glyph); if(!isNaN(intraSetColumnWidthRatio)) currentSeries.columnWidthRatio = intraSetColumnWidthRatio; if(!isNaN(intraSetMaxColumnWidth)) currentSeries.maxColumnWidth = intraSetMaxColumnWidth; } } 

used like this:

 var cs:TestColumnSet = new TestColumnSet(); ... cs.intraSetColumnWidthRatio = cs.columnWidthRatio/cs.series.length*(1-desiredSpaceRatio); 
0
source

Source: https://habr.com/ru/post/1334853/


All Articles