Page 1 of 1

Why right side axis Y is in chart's view when set margin

Posted: Tue Jan 09, 2018 1:52 am
by Harry943
Hello, I get a question when set axis position. I set ViewXY's margin, disable AutoAdjustMargins and set YAxisAutoPlacement to AllRight, but the result not as what I thought: The Y Axis is in view
The xaml Code below:

Code: Select all

    <Grid>
        <lcusb:LightningChartUltimate Content="LightningChartUltimate">
            <lcusb:LightningChartUltimate.ViewXY>
                <lcusb:ViewXY Margins="50">
                    <lcusb:ViewXY.AxisLayout>
                        <lcusb:AxisLayout AutoAdjustMargins="False" YAxisAutoPlacement="AllRight"  XAxisAutoPlacement="AllTop"/>
                    </lcusb:ViewXY.AxisLayout>
                    <lcusb:ViewXY.YAxes>
                        <lcusb:AxisY/>
                    </lcusb:ViewXY.YAxes>
                    <lcusb:ViewXY.XAxes>
                        <lcusb:AxisX/>
                    </lcusb:ViewXY.XAxes>
                </lcusb:ViewXY>
            </lcusb:LightningChartUltimate.ViewXY>
        </lcusb:LightningChartUltimate>
    </Grid>
The x axis behave normal but the y axis is not.
I knew that enable AutoAdjustMargins don't have this problem, but I should set solid margin for special requirement.
Can this be solve? Thx.

Re: Why right side axis Y is in chart's view when set margin

Posted: Tue Jan 09, 2018 8:20 am
by ArctionKestutis
Hello,

I guess you want YAxis labels and Title to be on the right. For that you need to set corresponding properties

Code: Select all

                            <lcusb:AxisY.Title>
                                <lcusb:AxisYTitle HorizontalAlign="Right"/>
                            </lcusb:AxisY.Title>
                            <lcusb:AxisY.MajorDivTickStyle>
                                <lcusb:AxisTickStyle Alignment="Far"/>
                            </lcusb:AxisY.MajorDivTickStyle>
All the best.

Re: Why right side axis Y is in chart's view when set margin

Posted: Wed Jan 10, 2018 2:33 am
by Harry943
Thx, it works!