Pre loader

Fifo with sciStockChart

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

I’m not clear how you set up FIFO with the SciStockChart class and mvvm; docs are a little weak; all the examples seem to use datasets rather than ChartSeriesViewModel. Do I simply set the fifocapacity? Do I need to set it at instantiation? Do all the ChartSeriesViewModels in a collection need to have the same Fifocapacity? Can I change the fifocapacity at runtime; and if so how would I change the capacity of all of the ChartSeriesViewModels (assuming they must all be the same) in a collection?

thanks in advance.

  • You must to post comments
0
0

Hi there,

Hmmm, we haven’t tried this (FIFO with SciStockChart). I do know many people have successfully used FIFO series with SciChartSurface / OhlcDataSeries to create a stock chart however.

Ok to answer some of your questions:

To denote a series as a FIFO Series, simply set the FIFO capacity on creation, e.g. 
 <pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
                var ds = new DataSeriesSet&lt;DateTime, double&gt;();
                var fifoSeries = new OhlcDataSeries&lt;DateTime, double&gt;() {FifoCapacity = 1000};
                ds.Add(fifoSeries);
 </pre>
Or, in your case, since you are using ChartSeriesViewModel, simply declaring this series and binding to it (the DataSet is created internally). 

If one series in a DataSeriesSet is a FIFO Series, all other series must be FIFO series.
As far as I'm aware, you can simply change the FifoCapacity to alter the size, however this will have the effect of clearing existing data.
To update the FIFO Capacity of all series, my advice would be to replace data-series with new resized versions, copying any data you wish to copy in the process

I hope you understand, its not a common use-case hence not one we’ve created an example for!

Best regards,
Andrew

  • You must to post comments
Showing 1 result
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