Skip to main content
.NET Framework 4.5.2+

ChartLineOptions.Visible Property

Gets or sets a value indicating whether the specific lines are visible on a chart.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll


bool Visible { get; set; }

Property Value

Type Description

true, to display the lines; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to Visible


Use the Visible property to display or hide the major (Axis.MajorGridlines) and minor (Axis.MinorGridlines) gridlines, leader lines (DataLabelOptions.LeaderLines), drop lines (ChartView.DropLines), high-low lines (ChartView.HighLowLines), or series lines (ChartView.SeriesLines) on a chart.


The example below demonstrates how to create a simple line chart and display major gridlines for the category axis and the minor gridlines for the value axis by setting the ChartLineOptions.Visible property to true.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask5")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.Line, worksheet("B2:C8"))
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

' Display the major gridlines of the category axis.
chart.PrimaryAxes(0).MajorGridlines.Visible = True
' Display the minor gridlines of the value axis.
chart.PrimaryAxes(1).MinorGridlines.Visible = True

' Hide the legend.
chart.Legend.Visible = False

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also