ChartObject.PlotArea Property
Provides access to the chart’s plot area.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
PlotArea | A PlotArea object that is the chart’s plot area. |
Remarks
The example below demonstrates how to create a transparent chart with a semi-transparent plot area.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheet-chart-api-e5222
Dim worksheet As Worksheet = workbook.Worksheets("chartTask4")
workbook.Worksheets.ActiveWorksheet = worksheet
' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.Line, worksheet("B3:D8"))
chart.TopLeftCell = worksheet.Cells("F3")
chart.BottomRightCell = worksheet.Cells("L14")
' Customize the chart area and the plot area appearance.
chart.Fill.SetNoFill()
chart.Outline.SetSolidFill(Color.FromArgb(&H99, &H99, &H99))
chart.PlotArea.Fill.SetSolidFill(Color.FromArgb(&H22, &H99, &H99, &H99))
' Specify the position of the legend.
chart.Legend.Position = LegendPosition.Top
' Use a secondary axis.
chart.Series(1).AxisGroup = AxisGroup.Secondary
' Customize the axis scale and appearance.
Dim axis As Axis = chart.PrimaryAxes(0)
axis.Outline.SetNoFill()
axis.MajorTickMarks = AxisTickMarks.None
axis = chart.PrimaryAxes(1)
axis.Outline.SetNoFill()
axis.MajorTickMarks = AxisTickMarks.None
axis.MajorGridlines.Visible = False
axis.Scaling.AutoMax = False
axis.Scaling.AutoMin = False
axis.Scaling.Max = 1400
axis.Scaling.Min = 0
axis = chart.SecondaryAxes(1)
axis.Outline.SetNoFill()
axis.MajorTickMarks = AxisTickMarks.None
axis.Scaling.AutoMax = False
axis.Scaling.AutoMin = False
axis.Scaling.Max = 390
axis.Scaling.Min = 270
See Also