Page 1 of 1

ViewXY: automatic title placement with manually set margins?

Posted: Wed Aug 06, 2014 4:28 pm
by greggorob64
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

Re: ViewXY: automatic title placement with manually set marg

Posted: Thu Aug 07, 2014 6:41 pm
by ArctionPasi
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.

Re: ViewXY: automatic title placement with manually set marg

Posted: Thu Aug 07, 2014 8:23 pm
by greggorob64
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?

Re: ViewXY: automatic title placement with manually set marg

Posted: Thu Aug 07, 2014 9:30 pm
by ArctionPasi
When YAxisTitleAutoplacement is True, Title.DistanceToAxis or Title.HorizontalAligh have no effect, because automatic title placement takes over.

Re: ViewXY: automatic title placement with manually set marg

Posted: Fri Aug 08, 2014 1:38 pm
by greggorob64
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.