corelibraries-devexpress-dot-xtracharts-dot-axis2d-a3d32806.md
Specifies whether to show X and Y-axes on a diagram.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public DefaultBoolean Visibility { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property Visibility As DefaultBoolean
| Type | Description |
|---|---|
| DefaultBoolean |
Default - the axis visibility is defined according to the adaptive layout algorithm when the chart is resized; True - X and Y-axes are visible on a diagram; False - X and Y-axes are hidden. The default is DefaultBoolean.Default.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
Use the Visibility property to control the overall visibility of an axis within a chart’s diagram.
Note
The Default returned value of the Visibility property is in affect when the adaptive layout feature is enabled. So, ensure the ChartControl.AutoLayout property is set to true.
The adaptive layout feature is used to maintain a better chart appearance and layout when the chart becomes smaller.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Visibility property.
Note
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.
winforms-charts-plot-xy-series-with-histogram/CS/Form1.cs#L39
diagram.AxisX.NumericScaleOptions.ScaleMode = ScaleMode.Interval;
diagram.AxisX.Visibility = DevExpress.Utils.DefaultBoolean.True;
diagram.AxisX.WholeRange.MinValue = MinValue;
winforms-charts-bind-individual-series-to-data/CS/Form1.cs#L53
((SideBySideBarSeriesView)series.View).ColorEach = true;
((XYDiagram)chart.Diagram).AxisY.Visibility = DevExpress.Utils.DefaultBoolean.False;
chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
winforms-charts-plot-xy-series-with-histogram/VB/Form1.vb#L66
diagram.AxisX.NumericScaleOptions.ScaleMode = ScaleMode.Interval
diagram.AxisX.Visibility = DevExpress.Utils.DefaultBoolean.True
diagram.AxisX.WholeRange.MinValue = MinValue
winforms-charts-bind-individual-series-to-data/VB/Form1.vb#L50
CType(series.View, SideBySideBarSeriesView).ColorEach = True
CType(chart.Diagram, XYDiagram).AxisY.Visibility = DevExpress.Utils.DefaultBoolean.False
chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False
See Also