SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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!

0
0

Hello guys,

Do series have some property of it renderable type?
I founded in ‘AddRemoveSeries’ example this line

// dataSeries.RenderAs = new LineSeries() { SeriesColor = DataManager.Instance.GetRandomColor() };

Or can you tell how can i add/remove/change series and its renderable style dinamically ?

Im using this code to replace series

void Create (OhlcDataSeries<DateTime, double> ser, SeriesType s …)
{
var renderseries = new FastCandlestickRenderableSeries { };
ChartControl.RenderableSeries.Add(renderseries);
ChartData.Add (ser);
}

void Replace (OhlcDataSeries<DateTime, double> ser, …)
{
int k = GetIndex ();

 ChartData.RemoveAt(k);
 ChartControl.RenderableSeries.RemoveAt (k);
 Create (ser, type ..);

}

Is it right way? looks like pornography
I think there will be some problems with overview
Example:
we got 2 series (price(candles) and ema (line)) overview shows price chart and after we change price series type to line, overview will show ema series, not price

  • You must to post comments
0
0

Hi there,

All renderable series have the DataSeriesIndex property, so you can show the same data series with different renderable series types. Please take a look at our SciTrader example, notice, how series type changing is implemented.

If you want to remove particular data series, you should also remove corresponding renderable series. There is Add and Remove Data Series dynamicaly article, you can find useful info there.

The Overview should update automatically when data series are added/removed.

Hope this helps!

Regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.