Class DisplayAxis
An axis that has a range.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.DataVisualization.Charting
Assembly: Controls.DataVisualization.OpenSilver.dll
Syntax
public abstract class DisplayAxis : Axis, IAxis, IRequireSeriesHost
Constructors
| Improve this Doc View SourceDisplayAxis()
Instantiates a new instance of the DisplayAxis class.
Declaration
protected DisplayAxis()
Fields
| Improve this Doc View SourceAxisGridName
The name of the axis grid template part.
Declaration
protected const string AxisGridName = "AxisGrid"
Field Value
Type | Description |
---|---|
System.String |
AxisLabelStyleProperty
Identifies the AxisLabelStyle dependency property.
Declaration
public static readonly DependencyProperty AxisLabelStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
AxisTitleName
The name of the axis title template part.
Declaration
protected const string AxisTitleName = "AxisTitle"
Field Value
Type | Description |
---|---|
System.String |
GridLineStyleProperty
Identifies the GridlineStyle dependency property.
Declaration
public static readonly DependencyProperty GridLineStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MajorTickMarkStyleProperty
Identifies the MajorTickMarkStyle dependency property.
Declaration
public static readonly DependencyProperty MajorTickMarkStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaximumAxisIntervalsPer200Pixels
Maximum intervals per 200 pixels.
Declaration
protected const double MaximumAxisIntervalsPer200Pixels = 8
Field Value
Type | Description |
---|---|
System.Double |
ShowGridLinesProperty
Identifies the ShowGridLines dependency property.
Declaration
public static readonly DependencyProperty ShowGridLinesProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TitleStyleProperty
Identifies the TitleStyle dependency property.
Declaration
public static readonly DependencyProperty TitleStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceActualLength
Gets the actual length.
Declaration
protected double ActualLength { get; }
Property Value
Type | Description |
---|---|
System.Double |
AxisLabelStyle
Gets or sets the style used for the axis labels.
Declaration
public Style AxisLabelStyle { get; set; }
Property Value
Type | Description |
---|---|
Style |
GridLineStyle
Gets or sets the Style of the Axis's gridlines.
Declaration
public Style GridLineStyle { get; set; }
Property Value
Type | Description |
---|---|
Style |
MajorTickMarkStyle
Gets or sets the style applied to the Axis tick marks.
Declaration
public Style MajorTickMarkStyle { get; set; }
Property Value
Type | Description |
---|---|
Style | The Style applied to the Axis tick marks. |
SeriesHost
Gets or sets the series host.
Declaration
public ISeriesHost SeriesHost { get; set; }
Property Value
Type | Description |
---|---|
ISeriesHost |
ShowGridLines
Gets or sets a value indicating whether grid lines should be shown.
Declaration
public bool ShowGridLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Title
Gets or sets the title property.
Declaration
public object Title { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
TitleStyle
Gets or sets the style applied to the Axis title.
Declaration
public Style TitleStyle { get; set; }
Property Value
Type | Description |
---|---|
Style | The Style applied to the Axis title. |
Methods
| Improve this Doc View SourceCreateAxisLabel()
Creates an axis label.
Declaration
protected virtual Control CreateAxisLabel()
Returns
Type | Description |
---|---|
Control | The new axis label. |
CreateMajorTickMark()
Creates a major axis tick mark.
Declaration
protected virtual Line CreateMajorTickMark()
Returns
Type | Description |
---|---|
Line | A line to used to render a tick mark. |
CreateTickMark(Style)
Creates a tick mark and applies a style to it.
Declaration
protected Line CreateTickMark(Style style)
Parameters
Type | Name | Description |
---|---|---|
Style | style | The style to apply. |
Returns
Type | Description |
---|---|
Line | The newly created tick mark. |
GetLength(Size)
Returns the length of the axis given an available size.
Declaration
protected double GetLength(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
System.Double | The length of the axis given an available size. |
GetMajorGridLineCoordinates(Size)
Returns the coordinates to use for the grid line control.
Declaration
protected abstract IEnumerable<UnitValue> GetMajorGridLineCoordinates(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<UnitValue> | A sequence of coordinates at which to draw grid lines. |
Invalidate()
Invalidates the axis.
Declaration
protected void Invalidate()
MeasureOverride(Size)
Renders the axis.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |
Returns
Type | Description |
---|---|
Size | The required size. |
Overrides
| Improve this Doc View SourceOnApplyTemplate()
Retrieves template parts and configures layout.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnAxisLabelStylePropertyChanged(Style, Style)
AxisLabelStyleProperty property changed handler.
Declaration
protected virtual void OnAxisLabelStylePropertyChanged(Style oldValue, Style newValue)
Parameters
Type | Name | Description |
---|---|---|
Style | oldValue | Old value. |
Style | newValue | New value. |
OnDependentAxesCollectionChanged()
Updates the grid lines element if a suitable dependent axis has been added to a radial axis.
Declaration
protected override void OnDependentAxesCollectionChanged()
Overrides
| Improve this Doc View SourceOnInvalidated(RoutedEventArgs)
Updates the visual appearance of the axis when it is invalidated.
Declaration
protected override void OnInvalidated(RoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | args | Information for the invalidated event. |
Overrides
| Improve this Doc View SourceOnLocationPropertyChanged(AxisLocation, AxisLocation)
Arranges the grid when the location property is changed.
Declaration
protected override void OnLocationPropertyChanged(AxisLocation oldValue, AxisLocation newValue)
Parameters
Type | Name | Description |
---|---|---|
AxisLocation | oldValue | The old location. |
AxisLocation | newValue | The new location. |
Overrides
| Improve this Doc View SourceOnMajorTickMarkStylePropertyChanged(Style, Style)
MajorTickMarkStyleProperty property changed handler.
Declaration
protected virtual void OnMajorTickMarkStylePropertyChanged(Style oldValue, Style newValue)
Parameters
Type | Name | Description |
---|---|---|
Style | oldValue | Old value. |
Style | newValue | New value. |
OnOrientationPropertyChanged(AxisOrientation, AxisOrientation)
Reformulates the grid when the orientation is changed. Grid is either separated into two columns or two rows. The title is inserted with the outermost section from the edge and an oriented panel is inserted into the innermost section.
Declaration
protected override void OnOrientationPropertyChanged(AxisOrientation oldValue, AxisOrientation newValue)
Parameters
Type | Name | Description |
---|---|---|
AxisOrientation | oldValue | The old value. |
AxisOrientation | newValue | The new value. |
Overrides
| Improve this Doc View SourceOnSeriesHostPropertyChanged(ISeriesHost, ISeriesHost)
This method is run when the series host property is changed.
Declaration
protected virtual void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)
Parameters
Type | Name | Description |
---|---|---|
ISeriesHost | oldValue | The old series host. |
ISeriesHost | newValue | The new series host. |
OnShowGridLinesPropertyChanged(Boolean, Boolean)
ShowGridLinesProperty property changed handler.
Declaration
protected virtual void OnShowGridLinesPropertyChanged(bool oldValue, bool newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | oldValue | Old value. |
System.Boolean | newValue | New value. |
OnTitlePropertyChanged(Object, Object)
TitleProperty property changed handler.
Declaration
protected virtual void OnTitlePropertyChanged(object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldValue | Old value. |
System.Object | newValue | New value. |
PrepareAxisLabel(Control, Object)
Prepares an axis label to be plotted.
Declaration
protected virtual void PrepareAxisLabel(Control label, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
Control | label | The axis label to prepare. |
System.Object | dataContext | The data context to use for the axis label. |
Render(Size)
Renders the axis labels, tick marks, and other visual elements.
Declaration
protected abstract void Render(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |