SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Hello,
how can i implement a vertically stacked y axis chart like in your example (WPF Chart Vertically Stacked YAxis) with MVVM and a varying number of y axes. Your example has a fixed number of y axes and the needed YAxesPanel is directly implemented in your xaml code. What is the best way to achieve the same result with a varying number of y axis?
Best regards
Alexander
Hi
I posted a similiar question some time before you.
My solution might not be ideal, but it is almost working for me. Since I’m developing the code for a customer, I’m not allowed to post code by NDA, but I can give you the theoretical approach.
This approach is from my point of view not the most performing, but the only I was able to discover from the docs.
The last task which I’m facing, is to get the height of the chart portion of the RenderSurface, as the height given in SizeChanged is of the full height including YAxis and other stuff drawn.
Maybe someone from SciChart can help out on this last task as my customer has a support subscription or do I have to open a support ticket?
Hope this helps you to solve your task
Cheers
Martin
Hello Martin,
thank you for your help. As you say in your description your approach is not the most performing. So it might be not the ideal way for me since performance is one of the key points in my current project. I would also like to hear from SciChart how this should be done in MVVM.
Best regards
Alexander
Hi,
this is my solution. It’s clear to me that it breaks MVVM since the ViewModel has a reference to the SciChartSurface. However if you need to call SuspendUpdates() in your ViewModel you need the reference anyway (see: https://www.scichart.com/questions/wpf/suspend-updates-in-mvvm-scenario). This is in my opinion the best way to do it. At least i found no better way.
Best regards
Alexander
Hi Alexander
I was unprecise in my explanation – it is not very performing, when drawing the first time.
After that it has only a little impact when sizing.
If the window is not changed, it has absolutely no measureable influence on the performance.
I wonder why nobody from SciChart support is taking part in this discussion, as I don’t believe it is a task which is only affecting us both…
Or we are doing something extremly special with our charts đŸ™‚
Cheers
Martin
Please login first to submit.