SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.