ChartAxis
Base chart axis class
Definition
Namespace:Telerik.Reporting.Charting
Assembly:Telerik.Reporting.dll
Syntax:
public abstract class ChartAxis : RenderedObject, IChartingStateManagedItem, IChartingStateManager, IOrdering
Inheritance: objectStateManagedObjectRenderedObjectChartAxis
Derived Classes:
Implements:
Inherited Members
Constructors
Creates a new instance of the ChartAxis class.
public ChartAxis(ChartPlotArea parent, IContainer container)
Creates a new instance of the ChartAxis class.
Fields
ChartAxis style
protected StyleAxis chartAxisAppearance
ChartAxis items
protected ChartAxisItemsCollection chartAxisItems
ChartAxis main label
protected ChartLabel chartAxisLabel
chartAxisMaxAxisValue
double
Maximum series value
protected double chartAxisMaxAxisValue
chartAxisMaxItemValue
double
Max axis item value
protected double chartAxisMaxItemValue
chartAxisMinAxisValue
double
Minimum series value
protected double chartAxisMinAxisValue
chartAxisMinItemValue
double
Min axis item value
protected double chartAxisMinItemValue
Parent element
protected ChartPlotArea chartAxisParent
chartAxisPointEnd
PointF
Axis zero value end point
protected PointF chartAxisPointEnd
chartAxisPointStart
PointF
Axis start point
protected PointF chartAxisPointStart
Is axis zero based
protected bool chartAxisRealIsZeroBased
pixelsPerValue
float
Pixels per value field.
protected float pixelsPerValue
zeroCoord
float
Cached zero coordinate value.
protected float zeroCoord
Properties
ChartAxis style
[TypeConverter(typeof(ExpandableObjectConverter))]
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[SkinnableProperty]
public StyleAxis Appearance { get; }
AutoScale
bool
Enables or disables automatic axis scaling.
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public bool AutoScale { get; set; }
ChartAxis label
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
[SkinnableProperty]
public ChartLabel AxisLabel { get; }
IsZeroBased
bool
Specifies whether the axis begins from 0.
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public bool IsZeroBased { get; set; }
Returns a collection of axis items.
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public ChartAxisItemsCollection Items { get; }
LabelStep
int
Draw each 1,2,...,n item
[Browsable(true)]
public int LabelStep { get; set; }
Gets or sets maximal count of the axis items when auto scaling.
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public int MaxItemsCount { get; set; }
MaxValue
double
Specifies the max value of the axis range.
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public virtual double MaxValue { get; set; }
MinValue
double
Specifies the min value of the axis range.
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public virtual double MinValue { get; set; }
Parent element (PlotArea)
[Browsable(false)]
public ChartPlotArea Parent { get; }
Step
double
Specifies the step at which axis values are calculated
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public virtual double Step { get; set; }
Returns the axis item at the specified position.
[Browsable(false)]
public ChartAxisItem this[int index] { get; }
Specifies whether the axis should be rendered.
public ChartAxisVisibility Visible { get; set; }
Determines the type of shown values
[Browsable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public ChartAxisVisibleValues VisibleValues { get; set; }
Methods
Adds a ChartAxisItem to the axis.
public void AddItem(ChartAxisItem item, params ChartAxisItem[] items)
Adds ChartAxisItems to the axis.
Adds a ChartAxisItemsCollection to the axis.
Adds ChartAxisItems to the axis.
Adds a new ChartAxisItem object to the axis with the specified label and color.
protected ChartAxisItem AddItem(string label, Color color, bool visible)
Axis label
colorColorItem text color
visibleboolVisibility
Returns:Adds a new ChartAxisItem object to the axis with the specified label and color.
protected ChartAxisItem AddItem(string label, Color color)
Axis label
colorColorItem text color
Returns:Automatically adds new axis items in AutoScale mode.
public void AddRange(double minValue, double maxValue, double step)
Min range value
maxValuedoubleMax range value
stepdoubleAxis step value
Auto determines the min and max value of the axis
protected void AutoCalcAxisExtents()
Clears data values of the axis.
public void Clear()
Restores initial values of cached axis settings
protected virtual void DisableCachedValues()
Releases unmanaged and - optionally - managed resources
protected override void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides:
GetAxisEndCoord()
float
Gets the end value coordinate
protected abstract float GetAxisEndCoord()
float
Coordinate
GetAxisStartCoord()
float
Gets the start value coordinate
protected abstract float GetAxisStartCoord()
float
Coordinate
Gets distance between points
protected float GetDistance(PointF point1, PointF point2)
First point
point2PointFSecond point
Returns:float
Distance
Gets the item at the specified index.
Loading ViewState data
protected override void LoadViewState(object savedState)
Saved state bag
Overrides:
Removes all items
public void RemoveAllItems()
Removes the ChartAxisItem specified.
public void RemoveItem(ChartAxisItem item, params ChartAxisItem[] items)
Removes the ChartAxisItems at the specified indexes.
public void RemoveItem(int index, params int[] indexes)
Removes the ChartAxisItem at the specified index.
public void RemoveItem(int itemIndex)
item's index
Removes the last item from the axis.
public void RemoveLastItem()
Resets the MaxValue to default
protected void ResetMaxValue()
Resets the MinValue to default
protected void ResetMinValue()
Resets the Step value to default
protected void ResetStep()
SaveViewState()
object
Saves data to a State Bag
protected override object SaveViewState()
object
Saved axis data to a state bag
Overrides:
Sets new color for the axis item text at the specified position.
public void SetItemColor(int itemIndex, Color newColor)
Item index in collection
newColorColorItem text color
Sets new label for the axis item at the specified position.
public void SetItemLabel(int itemIndex, ChartAxisItem newLabel)
Item index in collection
newLabelChartAxisItemSets new label text for the axis item at the specified position.
public void SetItemLabel(int itemIndex, string newLabelText)
Item index in collection
newLabelTextstringAxis item label text
Sets the maximum axis range value
protected void SetMaxValue(double maxValue)
Sets the min axis range value
protected void SetMinValue(double minValue)
Value to set
The axis MaxValue design time serialization reason
protected bool ShouldSerializeMaxValue()
bool
True is value have to be serialized
The axis MinValue design time serialization reason
protected bool ShouldSerializeMinValue()
bool
True is value have to be serialized
The axis Step design time serialization reason
protected bool ShouldSerializeStep()
bool
True is value have to be serialized
Tracking ViewState
protected override void TrackViewState()
Overrides: