在WPF中我可以创建散点图吗?

时间:2016-06-07 17:23:16

标签: c# .net wpf charts scatter-plot

我可以在wpf中创建散点图吗?我失败了,我想创建一个图像(图像是在Exel中创建的)

Scatter

2 个答案:

答案 0 :(得分:0)

尝试使用DevExpress Components Sample diagram

答案 1 :(得分:0)

我设法找到了使用oxyplot的解决方案,我这样做了。

var grafica = new PlotModel { LegendPosition = LegendPosition.TopRight };

            var functionSeries1 = new FunctionSeries { Title = "Clase de Exactitud" };
            functionSeries1.Points.Add(new DataPoint(0, 1.2));
            functionSeries1.Points.Add(new DataPoint(3, 1.2));
            functionSeries1.Points.Add(new DataPoint(8, 1.2));
            functionSeries1.Points.Add(new DataPoint(12, 1.2));
            functionSeries1.Points.Add(new DataPoint(20, 1.2));
            functionSeries1.Points.Add(new DataPoint(29.99, 1.2));
            grafica.Series.Add(functionSeries1);