ViewXY: automatic title placement with manually set margins?

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

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

ViewXY: automatic title placement with manually set margins?

Post by greggorob64 » Wed Aug 06, 2014 4:28 pm

I have my margins hard set to specific values. However, I have my Y axis title placement set to automatic. The title is not bieng property placed, and is always over my Y axis.

I know I can set 'distance to axis' but it would be nice if the autoplacement feature worked.

Do i have any options?

Thanks

Image

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

Re: ViewXY: automatic title placement with manually set marg

Post by ArctionPasi » Thu Aug 07, 2014 6:41 pm

I just tested with the LC Winforms demo app's first example. I set ViewXY.AxisLayout.AutoAdjust margins = False, then set new value to ViewXY.Margins.Left. The title adjusts automatically next to the Y axis.

Check you have set ViewXY.AxisLayout.YAxisTitleAutoplacement = True.

Don't use ViewXY.TitleAutoPlacement property, it's practically for series titles only. Little confusing name maybe.
LightningChart Support Team, PT

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

Re: ViewXY: automatic title placement with manually set marg

Post by greggorob64 » Thu Aug 07, 2014 8:23 pm

I am not using YAxisTitleAutoplacement or TitleAutoPlacement (tried setting them to true)

It also seems like

axisY.Title.DistanceToAxis = 50; (or any other number, is having no effect).

also to no avail is axisY.Title.HorizontalAlign = YAxisTitleAlignmentHorizontal.Left;

probably time for a sample project?

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

Re: ViewXY: automatic title placement with manually set marg

Post by ArctionPasi » Thu Aug 07, 2014 9:30 pm

When YAxisTitleAutoplacement is True, Title.DistanceToAxis or Title.HorizontalAligh have no effect, because automatic title placement takes over.
LightningChart Support Team, PT

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

Re: ViewXY: automatic title placement with manually set marg

Post by greggorob64 » Fri Aug 08, 2014 1:38 pm

I don't know where my brain was at, for some reason i thought i had to set it to true.

Anyways, I have it working, but I don't understand why.

I have

Code: Select all

            thisChart.ViewXY.AxisLayout.AutoAdjustMargins = false;
            thisChart.ViewXY.AxisLayout.YAxisTitleAutoPlacement = false;
And I'm not specifying the location at all. If I set YAxisTitleAutoPlacement=true, then the location gets all messed up again. There's something strange going on, but I'm working as of now.