Page 1 of 1

Setting value of the MajorDivTickStyle property prevents axis wheel zooming

Posted: Mon Mar 18, 2024 4:56 pm
by Micha_el
Hi,

I found a strange behaviour which I also can reproduce with your official examples:

I want to zoom by mouse wheel when cursor is over the axis, therefore I set in xaml:

Code: Select all

<lcusb:ViewXY.ZoomPanOptions>
    <lcusb:ZoomPanOptions AxisWheelAction="Zoom"/>
</lcusb:ViewXY.ZoomPanOptions>
After that I wanted to set the color of the MajorDivTickStyle property also in xaml:

Code: Select all

<lcusb:AxisX.MajorDivTickStyle>
    <lcusb:AxisTickStyle Color="Black"/>
</lcusb:AxisX.MajorDivTickStyle>
Now the axis wheel zooming stopped working. It's also impossible to pan the axis anymore when mouse cursor is over the axis.

Interestingly when I set the color of the MajorDivTickStyle property in code behind like this, axis wheel zooming still works:

Code: Select all

AxisX.MajorDivTickStyle.Color = Colors.Black;
Seems like a bug?

Re: Setting value of the MajorDivTickStyle property prevents axis wheel zooming

Posted: Tue Mar 19, 2024 11:08 am
by ArctionKestutis
Thanks for the report.
Yes, seems like an error and we can replicate it. Fortunately you already found workaround.

By the way, do you know that bindable chart edition is slightly slower compare to non-bindable. Therefore, if you want to extract maximum LighntingChart performance it is recommended to use non-bindable WPF or WinForms edition and set properties in the code behind. However, if chart is not very busy, performance difference will be insignificant.