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