How to enable 3d view and indexed mode in WinForms Chart?
To enable the 3D perspective view in a WinForms Charts, set the Series3D property to true. By default, chart points have both X and Y values, which are considered when plotting.
Indexed mode is beneficial when representing data that lacks genuine X-axis values, apart from their positions. By setting the Indexed property to true, you can activate Indexed mode for the chart.
C#
//Assign the X and Y axes
this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime;
this.chartControl1.PrimaryXAxis.DateTimeFormat = "dd/MM/yyyy";
this.chartControl1.PrimaryYAxis.ValueType = ChartValueType.Double;
//Configure the chart series
ChartSeries chartSeries = new ChartSeries("Sales");
foreach(var data in dataSource)
{
chartSeries.Points.Add(data.Date, data.YValue);
}
//Enable the Indexed property
this.chartControl1.Indexed = true;
//Enable the Series 3D property
this.chartControl1.Series3D = true;
VB
'Assign the X and Y axes
columnChart.PrimaryXAxis.ValueType = ChartValueType.DateTime
columnChart.PrimaryXAxis.DateTimeFormat = "dd/MM/yyyy"
columnChart.PrimaryYAxis.ValueType = ChartValueType.Double
'Configure the chart series
Dim ChartSeries1 As ChartSeries = New ChartSeries("Sales")
For Each salesData In viewModel.DataSource
ChartSeries1.Points.Add(salesData.DateValue, salesData.Sales)
Next
'Enable the Indexed property
columnChart.Indexed = True
'Enable the Series 3D property
columnChart.Series3D = True
Output:
Conclusion
I hope you enjoyed learning about how to enable 3D view and Indexed mode 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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!