XYAxisBase Class
Represents the base functionality of a chart axis.
[StyleTypedProperty(Property = "LabelStyle", StyleTargetType = typeof(TextBlock))]
[StyleTypedProperty(Property = "TitleStyle", StyleTargetType = typeof(ContentControl))]
[StyleTypedProperty(Property = "TickMajorStyle", StyleTargetType = typeof(Path))]
[StyleTypedProperty(Property = "TickMinorStyle", StyleTargetType = typeof(Path))]
[TemplatePart(Name = "PART_LogicalGrid", Type = typeof(Grid))]
public abstract class XYAxisBase : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IRefreshable
- Inheritance:
- Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control Object
Properties
AreLabelsVisible
Whether or not axis labels are visible.
AreMajorTicksVisible
Whether or not major ticks are visible.
AreMinorTicksVisible
Whether or not minor ticks are visible.
AxisType
The type of data on the axis.
BarGroupSpacing
Gets or sets the bar group spacing.
BarSpacing
Gets or sets the amount of spacing applied to either side of the individual bar shapes. This is a dependency property.
public Unit BarSpacing { get; set; }
Property Value
- Unit:
The amount of spacing applied to either side of the individual bar shapes. The default value is
1px
.
LabelAngle
The angle at which to draw the axis labels.
LabelFormat
Gets or sets the string format used when presenting a label on an axis tick. This is a dependency property.
public string LabelFormat { get; set; }
Property Value
- String:
The string format used when presenting a label on an axis tick.
Remarks
The format string will be passed the following parameters:
- {0} - The value of the axis tick, or null when the axis is slotted, such as on a bar chart.
- {1} - The starting value of the current slot when the axis is slotted, such as on a bar chart. Otherwise, null.
- {2} - The ending value of the current slot when the axis is slotted, such as on a bar chart. Otherwise, null.
LabelStyle
Position
Gets or sets the axis position.
Ranges
Gets the collection of ranges displayed by this chart.
public XYRangeCollection Ranges { get; }
Property Value
- XYRangeCollection:
The collection of ranges displayed by this chart.
TickMajorStyle
TickMinorStyle
Title
Gets or sets the axis title.
TitleStyle
Gets or sets the style to apply to the axis title. TargetType of the Style must be a ContentPresenter.
UseDisplayOptimizations
Whether data point values are rounded to better appear on display pixels.
public bool UseDisplayOptimizations { get; set; }
Property Value
- Boolean:
true
if data point values are rounded to better appear on display pixels; otherwise,false
. The default value istrue
.
Remarks
This property is usually good to leave as its default value of true
because it will ensure that lines render with minimal anti-aliasing.
It accomplishes this by slightly rounding data point values as needed.
However if precise data point locations are required, such as when rendering a smooth curved line graph, set this to false
to remove line jaggedness.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnPropertyChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Called when property changed.
protected static void OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
Parameter | Type | Description |
---|---|---|
sender | DependencyObject | The sender. |
args | DependencyPropertyChangedEventArgs | The DependencyPropertyChangedEventArgs instance containing the event data. |
Events
Refreshed
Occurs when XYAxisBase is refershed.
Fields
AreLabelsVisibleProperty
Identifies the AreLabelsVisible dependency property. This field is read-only.
public static readonly DependencyProperty AreLabelsVisibleProperty
AreMajorTicksVisibleProperty
Identifies the AreMajorTicksVisible dependency property. This field is read-only.
public static readonly DependencyProperty AreMajorTicksVisibleProperty
AreMinorTicksVisibleProperty
Identifies the AreMinorTicksVisible dependency property. This field is read-only.
public static readonly DependencyProperty AreMinorTicksVisibleProperty
BarGroupSpacingProperty
Identifies the BarGroupSpacing dependency property. This field is read-only.
public static readonly DependencyProperty BarGroupSpacingProperty
BarSpacingProperty
Identifies the BarSpacing dependency property. This field is read-only.
public static readonly DependencyProperty BarSpacingProperty
LabelAngleProperty
Identifies the LabelAngle dependency property. This field is read-only.
public static readonly DependencyProperty LabelAngleProperty
LabelFormatProperty
Identifies the LabelFormat dependency property. This field is read-only.
public static readonly DependencyProperty LabelFormatProperty
LabelStyleProperty
Identifies the LabelStyle dependency property. This field is read-only.
public static readonly DependencyProperty LabelStyleProperty
PositionProperty
Identifies the Position dependency property. This field is read-only.
public static readonly DependencyProperty PositionProperty
TickMajorStyleProperty
Identifies the TickMajorStyle dependency property. This field is read-only.
public static readonly DependencyProperty TickMajorStyleProperty
TickMinorStyleProperty
Identifies the TickMinorStyle dependency property. This field is read-only.
public static readonly DependencyProperty TickMinorStyleProperty
TitleProperty
Identifies the Title dependency property. This field is read-only.
public static readonly DependencyProperty TitleProperty
TitleStyleProperty
Identifies the TitleStyle dependency property. This field is read-only.
public static readonly DependencyProperty TitleStyleProperty
UseDisplayOptimizationsProperty
Identifies the UseDisplayOptimizations dependency property. This field is read-only.
public static readonly DependencyProperty UseDisplayOptimizationsProperty
Inherited Members
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()