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.
Return to Using the Chart Control in Spread.
Using Code
Set the ViewType property in the SpeadChart class.
Example
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) |
Context Menu
You can set the view type to 2D or 3D by using the chart context menu.
- Right-click the Chart control on the form at design time.
- Select ViewType in the context menu and set the type.
Using the Spread Designer
You can set the view type to 2D or 3D using the properties window in the designer.
- Select the Chart control in the designer.
- The ViewType setting is under the Behavior category in the properties window on the right side of the designer (selected item section).
- Click Apply and Exit to close the Spread Designer.