Hi folks,
I haven’t been able to produce scatter charts using a XyScatterRenderableSeries. To demonstrate, I took a sample project you sent me earlier and replaced one line as shown below:
_chartSeries = new ObservableCollection<IChartSeriesViewModel>();
//var renderableSeries = new FastLineRenderableSeries { SeriesColor = Colors.BlueViolet};
var renderableSeries = new XyScatterRenderableSeries { SeriesColor = Colors.BlueViolet};
_chartSeries.Add(new ChartSeriesViewModel(ds0, renderableSeries));
With the original FastLineRenderableSeries, I see the chart. But with XyScatterRenderableSeries, the data does not appear. (Annotations remain visible, of course.)
Am I doing something wrong, or does the ChartSeriesViewModel not work with scatter charts?
Thanks,
–George
- yefchak asked 11 years ago
- You must login to post comments
Hi George,
You’ll have to set the PointMarker property on the XyScatterRenderableSeries to get it to work. It ignores SeriesColor and uses only the PointMarker.
I believe there are a few posts in the forums about creating point-markers in code, including a helper class somewhere which generates a control template from size & color.
I realise its not an ideal API – we’re working on improving our MVVM API for SciChart v2.0
Thanks!
Andrew
- Andrew Burnett-Thompson answered 11 years ago
- You must login to post comments
Came across this old question when I had a similar problem. It seems like today you can just do:
new XyScatterRenderableSeries
{
PointMarker = new Abt.Controls.SciChart.Visuals.PointMarkers.EllipsePointMarker()
};
There are other point markers in the Abt.Controls.SciChart.Visuals.PointMarkers namespace (EllipsePointMarker, CrossPointMarker, SpritePointMarker, SquarePointMarker and TrianglePointMarker), which all derive from BasePointMarker.
I guess it’s possible to derive from BasePointMarker and make your own custom PointMarkers somehow.
- Robert Evans answered 9 years ago
- last edited 9 years ago
- You must login to post comments
Please login first to submit.