Setting value of the MajorDivTickStyle property prevents axis wheel zooming

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
Micha_el
Posts: 7
Joined: Wed Nov 15, 2023 12:25 pm

Setting value of the MajorDivTickStyle property prevents axis wheel zooming

Post by Micha_el » Mon Mar 18, 2024 4:56 pm

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?

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

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

Post by ArctionKestutis » Tue Mar 19, 2024 11:08 am

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.

Post Reply