Set ItemsSource to a Collection of IDataPoints.

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

willmoore88 wrote at 2013-10-21 17:42:

I have a collection of IDataPoints...
        public Collection<IDataPoint> dataPoints1 = new Collection<IDataPoint>();
I set my ScatterSeries too said Collection.
var lineSeries1 = new ScatterSeries((string)Application.Current.FindResource("cloudLayersText"))
            {
                MarkerFill = CloudDetColour,
                MarkerStroke = CloudDetColour,
                MarkerType = MarkerType.Square,
                MarkerSize = 1.5,
                ItemsSource = dataPoints1,
            };
Why is my graph not showing the data I then subsequently add to my collection of IDataPoints? I know there is data in there as I can see there is over 1400 items in the collection.

willmoore88 wrote at 2013-10-23 11:18:

Anyone?

objo wrote at 2013-10-23 11:23:

Do you refresh/invalidate the plot / plotModel after you have added to the collection? I should add this as FAQ #1 :)

willmoore88 wrote at 2013-10-23 11:26:

I do this after updating the collections.
CloudLayerPlotModel.RefreshPlot(true);
OnPropertyChanged("CloudLayerPlotModel");

willmoore88 wrote at 2013-10-24 09:45:

What else could it be?