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
- Alexander Lipp asked 5 years ago
- You must login to post comments
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- Martin Hanke answered 5 years ago
- You must login to post comments
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.
- specify the number of YAxes in VM
- use this to build the grid inside ItemPanelTemplate and bind with DynamicResource (see example in link below)
- to do so, use class from this blog and adopt as needed. I build a specialized class for my use-case
- bind to the SizeChangedEvent of RenderSurface
- Iterate the axes from YAxes, calculate height per axis and set it.
- inside the same loop don’t forget to set the row by using Grid.SetRow(axis, rowIndex)
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
- Martin Hanke answered 5 years ago
- last edited 5 years ago
- You must login to post comments
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
- Alexander Lipp answered 5 years ago
- You must login to post comments
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
- Alexander Lipp answered 5 years ago
- You must login to post comments
Please login first to submit.