Page 1 of 1

Custom Y-Axis arrangement

Posted: Wed Apr 27, 2016 10:29 am
by Igor
Hi Pasi,

is it possible to change the location of a specific y-axis and not use the "YAxisAutoPlacement" (LeftThenRight, AllLeft...)?
So I could place for example three axes on the left side and one on the right side.

# Auto placement left then right
LeftThenRight.png
LeftThenRight.png (53.67 KiB) Viewed 12410 times
# wished behaviour, were I could set the location of the axis via property ("yAxis2.Location = Location.Left;" or something like this )
3AxisLeft_1AxisRight.png
3AxisLeft_1AxisRight.png (53.58 KiB) Viewed 12410 times
I haven't found anything about this in the documentation nor in the demo application.
Thank you

Igor

Re: Custom Y-Axis arrangement

Posted: Wed Apr 27, 2016 3:13 pm
by ArctionPasi
That's possible by disabling Y axes auto placement, and setting Position property for each Y axis, and aligning the ticks.

- Set ViewXY.AxisLayout.YAxesAutoPlacement = Off
- Set yAxis.Position for each Y axis. Position is defined in percents of graph width. 0 = Left margin, 100 = right margin. It can be set negative too.
- Then you'll need to align Y axis ticks and labels. For those that you want to right-align the ticks, set yAxis.MajorDivTickStyle.Alignment = Far. Same for MinorDivTickStyle.

That's about it 8-)

Re: Custom Y-Axis arrangement

Posted: Wed Feb 22, 2017 11:20 pm
by lokesh
Hi,
I was following this thread and ended up with this:
yAxisScaling.png
yAxisScaling.png (70.33 KiB) Viewed 11543 times
I was able to set the y-axes, but the view got cropped somehow. Could you please help me set the view properly inside the chart? I have been playing with it for some time without any luck.

Thanks in advance.

Regards,
Lokesh

Re: Custom Y-Axis arrangement

Posted: Thu Feb 23, 2017 6:28 am
by ArctionPasi
Hi Lokesh,

please set ViewXY.AxisLayout.AutoAdjustMargins = false, and set margins rectangle manually in ViewXY.Margins.