AutoAdjustMargins ignores some texts

Questions or problems related to updating projects from v.6 to v.7

Moderator: Arction_LasseP

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

AutoAdjustMargins ignores some texts

Post by matus » Mon Sep 19, 2016 8:30 am

Hello,
when ViewXY.AxisLayout.AutoAdjustMargins = true, some labels are cut off.

Namely axis title, some vertical axis labels and x-axis maximum label.
cut off left axis title and last x-axis label
cut off left axis title and last x-axis label
title and x-label.PNG (46.77 KiB) Viewed 5784 times
cut off y-axis labels
cut off y-axis labels
y-axis labels.PNG (5.98 KiB) Viewed 5784 times
for the right axis, this is the setting:

Code: Select all

            rightAxis.LabelTicksGap = 0;
            rightAxis.MajorDivTickStyle.Alignment = Alignment.Far;
if I set the Alignment to Near, the labels are cut off completely, so that does not help
increasing the gap has the same effect, setting it to negative number is ignored

Is it possible to have automatic margins respect all chart elements?

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

Re: AutoAdjustMargins ignores some texts

Post by ArctionPasi » Wed Sep 21, 2016 9:07 am

Hi Matus,

please ensure you are running with 7.1.3.6 assemblies. In some older versions LabelsTicksGap didn't apply correctly.

I made tests with 7.1.3.6 and I wasn't able to reporoduce the problems your are encountering. The axis titles are not cut, nor axis numeric labels.

Automatic margins are best used with ViewXY.AxisLayout.YAxisAutoplacement enabled, and ViewXY.AxisLayout.YAxisTitleAutoPlacement enabled.
LightningChart Support Team, PT