Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

Answered

1

0

Hi All,

I have a situation where the chart needs to be switched between a log scale and a linear scale. To solve this I created 2 axis (one of each) and collapse one of them while the other is visible. The user can switch between them from a context menu.

THE ISSUE: I’ve noticed that the Major and Minor gridlines are drawn based on the order the Axis are declared in <s:SciChartSurface.YAxes> which isn’t a problem. The problem comes when I collapse one axis and make the other visible (obviously re-assigning the series to the visible axis by ID) – The axis and data change as you might expect but the major and minor gridlines are not redrawn.

In summary, if you start with log gridlines, you always get log gridlines – even on a linear axis.

Hi Andrew - I do like this answer, it solves my immediate problem and points me in the right direction for a proper MVVM implementation. We're trying to move towards this pattern but we're a bit inexperienced and most of the time an expedient solution wins over a proper one. Thanks again

If we had time to create answers like this all the time, we would! As our products mature we are hoping to spend more time on educating our users on general WPF tips/tricks as well as scichart API tips. Best regards, Andrew

It’s a great solution! Thank you for sharing! Please be advised – if you share the LogarithmicAxisY instance on more than one chart, it will break. Ensure the LogarithmicAxisY is declared with x:Shared=”False” to prevent this