ViewXY and margins

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

ViewXY and margins

Post by greggorob64 » Wed May 07, 2014 7:12 pm

Im attempting to use multiple Y axis overlaid on top of each other. To get the graph to look reasonable, I know i'm going to have to do two things:

1) Add a position offset to each Y axis beyond the first in order to offset them
2) Change the location of the ViewXY so that the axis and graph area line up nicely

During step 2, i am attempting to set margins on my graph area. However, the 'left' is not getting set to the value i want it to be (lets say 200).

In the following code snippet, b.Left does not have 300, which is what i set it to.

What am I missing?

Image

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

Re: ViewXY and margins

Post by ArctionPasi » Wed May 07, 2014 7:32 pm

Are you using v.5 or v.6? V.6 has automatic layout options and margins enabled by default. Set chart.ViewXY.AxisLayout.AutoAdjustMargins = false. Then the Margins settings will apply, and you should get same values from GetMarginsRect() call.
LightningChart Support Team, PT

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

Re: ViewXY and margins

Post by greggorob64 » Wed May 07, 2014 7:49 pm

I'm downloading V6.0 right now, i'll let you know, thanks!

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

Re: ViewXY and margins

Post by greggorob64 » Wed May 07, 2014 8:48 pm

Thanks, the upgrade did the trick! I can clean up a lot of the messing with Axis now that this is in place.

It might be worth noting that things like my axis positioning got pretty messed up, as well as my margins; its kind of a breaking change.

Post Reply