WPF Example 1 issue

Oystein Bjorke 10 aastat tagasi 0
This discussion was imported from CodePlex

jernejj wrote at 2013-02-17 20:59:

Hi,

I'm writing this application that will need to display a number of line graphs, so I tried to implement something along the lines of your WPF example.

However, the LineSeries() constructor doesn't accept any arguments and the class doesn't seem to have a Points property.

I downloaded OxyPlot through NuGet and am using VS 2012.

What am I missing here?

Thank you in advance.

objo wrote at 2013-02-17 21:06:

Create an OxyPlot.PlotModel and add a OxyPlot.LineSeries to access the Points collection.
The Points collection is not available in the OxyPlot.Wpf.LineSeries wrapper class (in this case, use the ItemsSource property)

jernejj wrote at 2013-02-17 21:28:

Thanks for the quick reply, it brought me to the solution.

There was no OxyPlot.LineSeries, but upon messing around I found OxyPlot.Series.LineSeries. And it has the Points collection.

I now have a basic graph drawn in my application, awesome.

On a completely unrelated note, is using this technique to draw up a bunch of points bad practice performance wise? I have a number of images and am displaying intensities in their pixels, so there will be a lot of points added to each graph.