Spread for ASP.NET 9.0 Product Documentation > Developer's Guide > Working with the Chart Control > Creating Charts > Using the Chart Control in Spread > Setting the Chart View Type |
You can specify a 2D or 3D view of the Chart control. You can set this with the ChartViewType parameter in the SpreadChart constructor when creating a chart. The following image shows a 2D chart.
The following image shows a 3D chart.
Set the ViewType property.
The following example sets the ViewType property.
C# |
Copy Code
|
---|---|
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart;
chart.ViewType = FarPoint.Web.Chart.ChartViewType.View2D;
fpSpread1.Sheets[0].Charts.Add(chart);
|
VB |
Copy Code
|
---|---|
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart() chart.ViewType = FarPoint.Web.Chart.ChartViewType.View2D FpSpread1.Sheets(0).Charts.Add(chart) |
You can set the view type to 2D or 3D by using the chart context menu.
You can set the view type to 2D or 3D using the properties window in the designer.