Articles in this section
Category / Section

How to customize data points for a chart series in WinForms Chart?

4 mins read

This guide explains how to customize data points within a series in Syncfusion® WinForms Chart by replacing the default data model. By default, each series uses an implementation of the IChartSeriesModel interface to manage its data.

To apply a custom data model, use the SeriesModel property of the chart series. This property allows you to assign your own implementation of IChartSeriesModel, enabling greater control over how data points are handled and displayed in the chart.


C#

//Customize data points using IChartSeriesModel Interface
ChartSeries chartSeries = new ChartSeries("Series");
chartSeries.SeriesModel = new NonIndexedModel(new double[] { 2, 5, 3, 4, 6 }, new double[] { 10, 33, 20, 43, 12 });
chartSeries.Style.DisplayText = true;
chartSeries.Style.TextOrientation = ChartTextOrientation.Up;
this.chartControl1.Series.Add(chartSeries);

VB

'Customize data points using IChartSeriesModel Interface
ChartSeries1.SeriesModel = New NonIndexedModel(New Double() {2, 5, 3, 4, 6}, New Double() {10, 33, 20, 43, 12})
ChartSeries1.Style.DisplayText = True
ChartSeries1.Style.TextOrientation = ChartTextOrientation.Up
columnChart.Series.Add(ChartSeries1)
Output:

customize data points for chart series


Conclusion

I hope you enjoyed learning about how to customize data points for a chart series in WinForms Chart.

You can refer to our WinForms Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our WinForms Chart examples to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you! 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied