.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ChartSheet.ActiveView Property

Provides access to an object that contains options to display and print a chart sheet.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.1.Core.dll


ChartSheetView ActiveView { get; }
ReadOnly Property ActiveView As ChartSheetView

Property Value

Type Description

A ChartSheetView object.


Use the ChartSheetView object's members to zoom a chart sheet (ChartSheetView.Zoom and ChartSheetView.ZoomToFit), select a sheet tab color (ChartSheetView.TabColor), and change print settings (ChartSheetView.Orientation, ChartSheetView.Margins and ChartSheetView.PaperKind). To access more print-specific options, use the ChartSheetPrintOptions object returned by the ChartSheet.PrintOptions property.


Dim worksheet As Worksheet = workbook.Worksheets("chartTask1")
workbook.Unit = DevExpress.Office.DocumentUnit.Inch

' Create a chart sheet containing a pie chart.
Dim chartSheet As ChartSheet = workbook.ChartSheets.Add(ChartType.Pie, worksheet("B2:C7"))

' Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape
chartSheet.ActiveView.PaperKind = System.Drawing.Printing.PaperKind.Letter

' Specify page margins.
Dim pageMargins As Margins = chartSheet.ActiveView.Margins
pageMargins.Left = 0.7F
pageMargins.Top = 0.75F
pageMargins.Right = 0.7F
pageMargins.Bottom = 0.75F

workbook.ChartSheets.ActiveChartSheet = chartSheet
See Also