Class CategoryAxis
An axis that displays categories.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.DataVisualization.Charting
Assembly: Controls.DataVisualization.OpenSilver.dll
Syntax
public class CategoryAxis : DisplayAxis, IRequireSeriesHost, ICategoryAxis, IAxis, IDataConsumer
Constructors
| Improve this Doc View SourceCategoryAxis()
Instantiates a new instance of the CategoryAxis class.
Declaration
public CategoryAxis()
Fields
| Improve this Doc View SourceSortOrderProperty
Identifies the SortOrder dependency property.
Declaration
public static readonly DependencyProperty SortOrderProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceSortOrder
Gets or sets the sort order used for the categories.
Declaration
public CategorySortOrder SortOrder { get; set; }
Property Value
Type | Description |
---|---|
CategorySortOrder |
Methods
| Improve this Doc View SourceCanPlot(Object)
Returns a value indicating whether a value can be plotted on the axis.
Declaration
public override bool CanPlot(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | A value which may or may not be able to be plotted. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether a value can be plotted on the axis. |
Overrides
| Improve this Doc View SourceDataChanged(IDataProvider, IEnumerable<Object>)
Updates the categories in response to an update from a registered axis data provider.
Declaration
public void DataChanged(IDataProvider dataProvider, IEnumerable<object> data)
Parameters
Type | Name | Description |
---|---|---|
IDataProvider | dataProvider | The category axis information provider. |
System.Collections.Generic.IEnumerable<System.Object> | data | A sequence of categories. |
GetCategoryAtPosition(UnitValue)
Returns the category at a given coordinate.
Declaration
public object GetCategoryAtPosition(UnitValue position)
Parameters
Type | Name | Description |
---|---|---|
UnitValue | position | The plot area position. |
Returns
Type | Description |
---|---|
System.Object | The category at the given plot area position. |
GetMajorGridLineCoordinates(Size)
Returns the major axis grid line coordinates.
Declaration
protected override 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 the major grid line coordinates. |
Overrides
| Improve this Doc View SourceGetPlotAreaCoordinate(Object)
The plot area coordinate of a value.
Declaration
public override UnitValue GetPlotAreaCoordinate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value for which to retrieve the plot area coordinate. |
Returns
Type | Description |
---|---|
UnitValue | The plot area coordinate. |
Overrides
| Improve this Doc View SourceGetPlotAreaCoordinateRange(Object)
Returns range of coordinates for a given category.
Declaration
public Range<UnitValue> GetPlotAreaCoordinateRange(object category)
Parameters
Type | Name | Description |
---|---|---|
System.Object | category | The category to return the range for. |
Returns
Type | Description |
---|---|
Range<UnitValue> | The range of coordinates corresponding to the category. |
OnObjectRegistered(IAxisListener)
Updates categories when a series is registered.
Declaration
protected override void OnObjectRegistered(IAxisListener series)
Parameters
Type | Name | Description |
---|---|---|
IAxisListener | series | The series to be registered. |
Overrides
| Improve this Doc View SourceOnObjectUnregistered(IAxisListener)
Updates categories when a series is unregistered.
Declaration
protected override void OnObjectUnregistered(IAxisListener series)
Parameters
Type | Name | Description |
---|---|---|
IAxisListener | series | The series to be unregistered. |
Overrides
| Improve this Doc View SourceRender(Size)
Renders the axis labels, tick marks, and other visual elements.
Declaration
protected override void Render(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size. |