YAxesLayout.Stacked empty space when deactivate axis

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

Post Reply
Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

YAxesLayout.Stacked empty space when deactivate axis

Post by Igor » Wed Apr 13, 2016 9:29 am

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 9925 times
# Current behaviour: empty space when deactivating the bottom y-axis
2.png
2.png (17.69 KiB) Viewed 9925 times
# Expected behaviour: first axis fills the whole area
3.png
3.png (25.01 KiB) Viewed 9925 times
thank you very much

Igor

User avatar
ArctionPasi
Posts: 1364
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by ArctionPasi » Wed Apr 13, 2016 2:42 pm

Simply by pulling out that Y axis from ViewXY.YAxes collection should be enough

Code: Select all

m_chart.ViewXY.YAxes.RemoveAt(1);
LightningChart Support Team, PT

Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by Igor » Thu Apr 14, 2016 6:38 am

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 :-)

Matthias Weidmann
Posts: 16
Joined: Tue Jun 21, 2016 10:24 am

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by Matthias Weidmann » Fri Aug 26, 2016 7:52 am

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

User avatar
ArctionPasi
Posts: 1364
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by ArctionPasi » Thu Sep 01, 2016 9:49 am

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.
LightningChart Support Team, PT

greggorob64
Posts: 181
Joined: Tue Mar 18, 2014 2:55 pm

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by greggorob64 » Thu Sep 01, 2016 5:26 pm

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

HelloWorld
Posts: 2
Joined: Mon Jun 17, 2019 4:08 pm

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by HelloWorld » Mon Jun 17, 2019 7:58 pm

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.

ArctionKestutis
Posts: 383
Joined: Mon Mar 14, 2016 9:22 am

Re: YAxesLayout.Stacked empty space when deactivate axis

Post by ArctionKestutis » Tue Jun 18, 2019 10:57 am

Few tip about Segmented layout could be found on following forum topic.

Post Reply