Page 1 of 1

YAxesLayout.Stacked empty space when deactivate axis

Posted: Wed Apr 13, 2016 9:29 am
by Igor
Hi,

in my chart I have stacked 2 y-axes which are both visible, but if I make an axis invisible it cause an empty space. Now I would expect that the other axis fills the whole area.
How could I implement my desired behaviour. It also could be that the chart contains more than 2 y-axes... so the other y-axes has to share the new free empty space and fit in.

# Stacked YAxesLayout with two Y-Axes
1.png
1.png (26.25 KiB) Viewed 22244 times
# Current behaviour: empty space when deactivating the bottom y-axis
2.png
2.png (17.69 KiB) Viewed 22244 times
# Expected behaviour: first axis fills the whole area
3.png
3.png (25.01 KiB) Viewed 22244 times
thank you very much

Igor

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Wed Apr 13, 2016 2:42 pm
by ArctionPasi
Simply by pulling out that Y axis from ViewXY.YAxes collection should be enough

Code: Select all

m_chart.ViewXY.YAxes.RemoveAt(1);

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Thu Apr 14, 2016 6:38 am
by Igor
This would work for me, but it could be complicated.
In my application the user can add and remove y-axes at anytime.
So I had to note the axes and the indexes and add the axis at the correct position again.

I had hoped that the axis can be easily shown/hidden by "Visible=false/true", but the empty space bother me :-)

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Fri Aug 26, 2016 7:52 am
by Matthias Weidmann
Hello Acrtion-Team,

for me this sounds like a bug, cause I can not see the benefit of keeping the space empty.
Is it planned to implement this behavior in the future, so that the axes must not be removed to use the empty space?

Best regards,
Matthias Weidmann

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Thu Sep 01, 2016 9:49 am
by ArctionPasi
There unfortunately is no easy way for us to change the behavior without upsetting a lot of users. Many developers want to hide the axis, but show the data that is bound to that hidden axis. If we hide the vertical space for that axis, data is not shown.

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Thu Sep 01, 2016 5:26 pm
by greggorob64
I'm running into a very similar issue, my solution was to use segements instead of stacked axes. Any series I want to show is assigned a segment. Any series I don't want to show has the Axis and Series' visible flags set to false and dumped into the last segment

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Mon Jun 17, 2019 7:58 pm
by HelloWorld
greggorob64 wrote:I'm running into a very similar issue, my solution was to use segements instead of stacked axes. Any series I want to show is assigned a segment. Any series I don't want to show has the Axis and Series' visible flags set to false and dumped into the last segment
Hi @greggorob64

could you please share that code.

Re: YAxesLayout.Stacked empty space when deactivate axis

Posted: Tue Jun 18, 2019 10:57 am
by ArctionKestutis
Few tip about Segmented layout could be found on following forum topic.