Pre loader

Vertically Stacked YAxis in MVVM with a varying number of axes

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

Version
5.3.0.11954
  • You must to post comments
0
0

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?

  • You must to post comments
0
0

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.


  1. specify the number of YAxes in VM
  2. use this to build the grid inside ItemPanelTemplate and bind with DynamicResource (see example in link below)
  3. to do so, use class from this blog and adopt as needed. I build a specialized class for my use-case
  4. bind to the SizeChangedEvent of RenderSurface
  5. Iterate the axes from YAxes, calculate height per axis and set it.
  6. 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

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies