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
- VRueda asked 11 years ago
- You must login to post comments
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
- Yuriy Zadereckiy answered 11 years ago
- You must login to post comments
Please login first to submit.