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:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control Object
Properties
AreLabelsVisible
Whether or not axis labels are visible.
public bool AreLabelsVisible { get; set; }
Property Value
- System.Boolean
AreMajorTicksVisible
Whether or not major ticks are visible.
public bool AreMajorTicksVisible { get; set; }
Property Value
- System.Boolean
AreMinorTicksVisible
Whether or not minor ticks are visible.
public bool AreMinorTicksVisible { get; set; }
Property Value
- System.Boolean
AxisType
The type of data on the axis.
public Type AxisType { get; }
Property Value
- System.Type
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.
public double LabelAngle { get; set; }
Property Value
- System.Double
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
- System.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
The style to apply to axis labels. TargetType of the System.Windows.Style must be a System.Windows.Controls.TextBlock.
public Style LabelStyle { get; set; }
Property Value
- System.Windows.Style
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
The style to apply to major ticks. TargetType of the System.Windows.Style must be a System.Windows.Shapes.Path.
public Style TickMajorStyle { get; set; }
Property Value
- System.Windows.Style
TickMinorStyle
The style to apply to minor ticks. TargetType of the System.Windows.Style must be a System.Windows.Shapes.Path.
public Style TickMinorStyle { get; set; }
Property Value
- System.Windows.Style
Title
Gets or sets the axis title.
public object Title { get; set; }
Property Value
- System.Object:
The title displayed on the axis.
TitleStyle
Gets or sets the style to apply to the axis title. TargetType of the System.Windows.Style must be a System.Windows.Controls.ContentPresenter.
public Style TitleStyle { get; set; }
Property Value
- System.Windows.Style:
The style to apply to the axis title.
UseDisplayOptimizations
Whether data point values are rounded to better appear on display pixels.
public bool UseDisplayOptimizations { get; set; }
Property Value
- System.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 | System.Windows.DependencyObject | The sender. |
args | System.Windows.DependencyPropertyChangedEventArgs | The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
Events
Refreshed
Occurs when XYAxisBase is refreshed.
public event EventHandler Refreshed
Event Type
- System.EventHandler
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
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.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()