Pre loader

Switching Chart Type (RenderableSeries) at runtime

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


Hi guys,

I’m tackling a difficult problem in my solution here. Our chart will allow users to add as many as 50 different series at any one time.

As well as this – the user will be able to specify the RenderableSeries (Chart Type) of each of these between; column, line and mountain.

One solution is to replicate the method found in your own SciChart SciTrader demonstration (in which each type of RenderableSeries is added to the xaml once for each data series, they share a DataSeries and then the Visibility property within the style is managed to only show the one the user requests), but this would require 150 (50 placeholders for 50 possible series * 3 definitions per series) definitions of different RenderableSeries, each with their own Style defined.

Is there any way to create a custom RenderableSeries that extends BaseRenderableSeries and add a DependencyProperty that allows a binding from the xaml to modify the type of RenderableSeries that is displayed?

Even better – is there a way to add RenderableSeries using MVVM (I noticed the add/remove dynamic series tutorial has a note to standby for such a tutorial). I will attempt to find a solution by going down this path as it sounds much less verbose.

Thanks in advance for all your help!

  • You must to post comments
Best Answer

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++.”

However, there is only sample code on the provided github.

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?

  • Simkins Ben
    Note for latecomers like me: the LineSerieSource class needs to inherit from DependencyObject
  • Andrew Burnett-Thompson
    Hello! If the property is RegisterAttached then you should be able to declare it in a plain CLR type (no need for DependencyObject).
  • You must to post comments

Whilst this approach is working fine for FastColumnRenderableSeries, I experience a strange behaviour using the new StackColumnRendererableSeries from v3.2. In fact, when switching the DataSeries to a different ViewModel, the chart columns are misplaced and start to blink very second (turned on and off by itself) without any exception being thrown.

Did I run into a bug here?

    • Guest
    • 10 years ago
    • 1
    Ah yes you did. Just comment out the line sciChartSurface.RenderableSeries.Clear(). Does it help? There is a known issue in v3.2 when you clear the RenderableSeries it causes internal state to get lost. As a workaround you can set sciChartSurface.RenderableSeries = new ObservableCollection()
  • swiedric
    Hi Andrew, yes, commenting out the Clear() function helped to get the Chart stable. Thanks, Silvio
  • Andrew Burnett-Thompson
    No probs :) We're going to fix it as a bug and push to v3.2.1 soon
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.