Hide columns in Flex table

I have a cluster diagram with two columns. The problem is that sometimes the values ​​of one column are so large that the other column is overshadowed. Therefore, I added checkboxes to show / hide this column, and set the visibility of ColumnSeries as such:

visible="{checkbox.selected}" includeInLayout="{checkbox.selected}"

This shows / hides the given column correctly, the problem is that it does not reset Y-Axis, so the other column never grows tall (when a column with large values ​​is hidden). I tried resetting the data provider, checking / canceling the chart, and nothing works.

Does anyone have any ideas?

Thank!

+3
source share
1 answer

, . ,

public function onToggle(){
    var newSeries:Array = [];
    if(bigSeries.selected) {
       newSeries.push(bigSeries);
    }
    if(smallSeries.selected) {
       newSeries.push(smallSeries);
    }
    chart.series = newSeries;
}
+4

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


All Articles