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


I would like to dynamically add and remove columns from a ColumnRenderableSeriesViewModel in code behind.

I am using MVVM and the SeriesBinding. I assigned a XyDataSeries<double, double> to the ColumnRenderableSeriesViewModel .DataSeries.

The chart initially draws all the bars for each item in the XYDataSeries, but If I append or remove one of them, the chart does not update and show the new bar or remove the old bar.

Here is my XAML:

        <s:SciChartSurface RenderableSeries="{s:SeriesBinding RenderableSeries}">
                <s:NumericAxis />

                <s:NumericAxis />

And some of my view model:

using SciChart.Charting.Model.ChartSeries;
using SciChart.Charting.Model.DataSeries;
using System.Collections.ObjectModel;

namespace ChartExample {
    public class ChartViewModel {
        ColumnRenderableSeriesViewModel _seriesViewModel = new ColumnRenderableSeriesViewModel();
        XyDataSeries<double, double> _dataSeries = new XyDataSeries<double, double>();

        public ChartViewModel() {
            _seriesViewModel.DataSeries = _dataSeries;

        public ObservableCollection<IRenderableSeriesViewModel> RenderableSeries { get; } = new ObservableCollection<IRenderableSeriesViewModel>();

        public void AddSeries() {
            _dataSeries.Append(_dataSeries.Count, _dataSeries.Count);

        public void RemoveSeries(int seriesIndex) {

Can you please tell me what I might be doing wrong?

  • You must to post comments

I figured out my issue. I needed to set the AutoRange=”Always” on the XAxis.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.