Wenn das, was Sie durch Spline-Serie bedeuten Linie Serie geglättet wird, können Sie OxyPlot verwenden (was natürlich kostenlos). Verwenden Sie einen LineSeries
und setzen Smooth
Eigenschaft sein true
:
hier ein Beispiel:
public MainWindow()
{
this.InitializeComponent();
var plotModel = new PlotModel { Title = "OxyPlot" };
plotModel.Axes.Add(new OxyPlot.Axes.LinearAxis { Position = OxyPlot.Axes.AxisPosition.Bottom });
plotModel.Axes.Add(new OxyPlot.Axes.LinearAxis { Position = OxyPlot.Axes.AxisPosition.Left, Maximum = 10, Minimum = 0 });
var series1 = new OxyPlot.Series.LineSeries
{
MarkerType = MarkerType.Circle,
MarkerSize = 5,
MarkerStroke = OxyColors.White
};
series1.Points.Add(new DataPoint(0, 6));
series1.Points.Add(new DataPoint(1, 2));
series1.Points.Add(new DataPoint(2, 4));
series1.Points.Add(new DataPoint(3, 2));
series1.Points.Add(new DataPoint(4, 7));
series1.Points.Add(new DataPoint(6, 6));
series1.Points.Add(new DataPoint(8, 8));
series1.Smooth = true;
plotModel.Series.Add(series1);
this.Content = new OxyPlot.Wpf.PlotView() { Model = plotModel };
}
Hinweis: dieser Teil: series1.Smooth = true;
Ja, das ist, was ich meinte. Danke es ist hilfreich. – Yogesh