Class
ChartAxis

Base chart axis class

Definition

Constructors

ChartAxis(ChartPlotArea)

Creates a new instance of the ChartAxis class.

Declaration

cs-api-definition
public ChartAxis(ChartPlotArea parent)

Parameters

parent

ChartPlotArea

ChartAxis(ChartPlotArea, IContainer)

Creates a new instance of the ChartAxis class.

Declaration

cs-api-definition
public ChartAxis(ChartPlotArea parent, IContainer container)

Parameters

parent

ChartPlotArea

container

IContainer

Fields

chartAxisAppearance

ChartAxis style

Declaration

cs-api-definition
protected StyleAxis chartAxisAppearance

Field Value

StyleAxis

chartAxisItems

ChartAxis items

Declaration

cs-api-definition
protected ChartAxisItemsCollection chartAxisItems

Field Value

ChartAxisItemsCollection

chartAxisLabel

ChartAxis main label

Declaration

cs-api-definition
protected ChartLabel chartAxisLabel

Field Value

ChartLabel

chartAxisMaxAxisValue

Maximum series value

Declaration

cs-api-definition
protected double chartAxisMaxAxisValue

Field Value

double

chartAxisMaxItemValue

Max axis item value

Declaration

cs-api-definition
protected double chartAxisMaxItemValue

Field Value

double

chartAxisMinAxisValue

Minimum series value

Declaration

cs-api-definition
protected double chartAxisMinAxisValue

Field Value

double

chartAxisMinItemValue

Min axis item value

Declaration

cs-api-definition
protected double chartAxisMinItemValue

Field Value

double

chartAxisParent

Parent element

Declaration

cs-api-definition
protected ChartPlotArea chartAxisParent

Field Value

ChartPlotArea

chartAxisPointEnd

Axis zero value end point

Declaration

cs-api-definition
protected PointF chartAxisPointEnd

Field Value

PointF

chartAxisPointStart

Axis start point

Declaration

cs-api-definition
protected PointF chartAxisPointStart

Field Value

PointF

chartAxisRealIsZeroBased

Is axis zero based

Declaration

cs-api-definition
protected bool chartAxisRealIsZeroBased

Field Value

bool

pixelsPerValue

Pixels per value field.

Declaration

cs-api-definition
protected float pixelsPerValue

Field Value

float

zeroCoord

Cached zero coordinate value.

Declaration

cs-api-definition
protected float zeroCoord

Field Value

float

Properties

Appearance

ChartAxis style

Declaration

cs-api-definition
[TypeConverter(typeof(ExpandableObjectConverter))]
[Browsable(true)]
[SkinnableProperty]
public StyleAxis Appearance { get; }

Property Value

StyleAxis

AutoScale

Enables or disables automatic axis scaling.

Declaration

cs-api-definition
[Browsable(true)]
public bool AutoScale { get; set; }

Property Value

bool

AxisLabel

ChartAxis label

Declaration

cs-api-definition
[Browsable(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
[SkinnableProperty]
public ChartLabel AxisLabel { get; }

Property Value

ChartLabel

IsZeroBased

Specifies whether the axis begins from 0.

Declaration

cs-api-definition
[Browsable(true)]
public bool IsZeroBased { get; set; }

Property Value

bool

Items

Returns a collection of axis items.

Declaration

cs-api-definition
[Browsable(true)]
public ChartAxisItemsCollection Items { get; }

Property Value

ChartAxisItemsCollection

LabelStep

Draw each 1,2,...,n item

Declaration

cs-api-definition
[Browsable(true)]
public int LabelStep { get; set; }

Property Value

int

MaxItemsCount

Gets or sets maximal count of the axis items when auto scaling.

Declaration

cs-api-definition
[Browsable(true)]
public int MaxItemsCount { get; set; }

Property Value

int

MaxValue

Specifies the max value of the axis range.

Declaration

cs-api-definition
[Browsable(true)]
public virtual double MaxValue { get; set; }

Property Value

double

MinValue

Specifies the min value of the axis range.

Declaration

cs-api-definition
[Browsable(true)]
public virtual double MinValue { get; set; }

Property Value

double

Parent

Parent element (PlotArea)

Declaration

cs-api-definition
[Browsable(false)]
public ChartPlotArea Parent { get; }

Property Value

ChartPlotArea

Step

Specifies the step at which axis values are calculated

Declaration

cs-api-definition
[Browsable(true)]
public virtual double Step { get; set; }

Property Value

double

Visible

Specifies whether the axis should be rendered.

Declaration

cs-api-definition
public ChartAxisVisibility Visible { get; set; }

Property Value

ChartAxisVisibility

VisibleValues

Determines the type of shown values

Declaration

cs-api-definition
[Browsable(true)]
public ChartAxisVisibleValues VisibleValues { get; set; }

Property Value

ChartAxisVisibleValues

this[int]

Returns the axis item at the specified position.

Declaration

cs-api-definition
[Browsable(false)]
public ChartAxisItem this[int index] { get; }

Parameters

index

int

Property Value

ChartAxisItem

Methods

AddItem(ChartAxisItem, params ChartAxisItem[])

Adds a ChartAxisItem to the axis.

Declaration

cs-api-definition
public void AddItem(ChartAxisItem item, params ChartAxisItem[] items)

Parameters

item

ChartAxisItem

items

ChartAxisItem[]

AddItem(ChartAxisItem[])

Adds ChartAxisItems to the axis.

Declaration

cs-api-definition
public void AddItem(ChartAxisItem[] items)

Parameters

items

ChartAxisItem[]

AddItem(ChartAxisItemsCollection)

Adds a ChartAxisItemsCollection to the axis.

Declaration

cs-api-definition
public void AddItem(ChartAxisItemsCollection items)

Parameters

items

ChartAxisItemsCollection

AddItem(List<ChartAxisItem>)

Adds ChartAxisItems to the axis.

Declaration

cs-api-definition
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

cs-api-definition
protected ChartAxisItem AddItem(string label, Color color)

Parameters

label

string

Axis label

color

Color

Item text color

Returns

ChartAxisItem

AddItem(string, Color, bool)

Adds a new ChartAxisItem object to the axis with the specified label and color.

Declaration

cs-api-definition
protected ChartAxisItem AddItem(string label, Color color, bool visible)

Parameters

label

string

Axis label

color

Color

Item text color

visible

bool

Visibility

Returns

ChartAxisItem

AddRange(double, double, double)

Automatically adds new axis items in AutoScale mode.

Declaration

cs-api-definition
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

cs-api-definition
protected void AutoCalcAxisExtents()

Clear()

Clears data values of the axis.

Declaration

cs-api-definition
public void Clear()

DisableCachedValues()

Restores initial values of cached axis settings

Declaration

cs-api-definition
protected virtual void DisableCachedValues()

GetAxisEndCoord()

Gets the end value coordinate

Declaration

cs-api-definition
protected abstract float GetAxisEndCoord()

Returns

float

Coordinate

GetAxisStartCoord()

Gets the start value coordinate

Declaration

cs-api-definition
protected abstract float GetAxisStartCoord()

Returns

float

Coordinate

GetDistance(PointF, PointF)

Gets distance between points

Declaration

cs-api-definition
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

cs-api-definition
public ChartAxisItem GetItem(int index)

Parameters

index

int

Returns

ChartAxisItem

LoadViewState(object)

Loading ViewState data

Declaration

cs-api-definition
protected override void LoadViewState(object savedState)

Parameters

savedState

object

Saved state bag

Overrides StateManagedObject.LoadViewState(object)

RemoveAllItems()

Removes all items

Declaration

cs-api-definition
public void RemoveAllItems()

RemoveItem(ChartAxisItem, params ChartAxisItem[])

Removes the ChartAxisItem specified.

Declaration

cs-api-definition
public void RemoveItem(ChartAxisItem item, params ChartAxisItem[] items)

Parameters

item

ChartAxisItem

items

ChartAxisItem[]

RemoveItem(int)

Removes the ChartAxisItem at the specified index.

Declaration

cs-api-definition
public void RemoveItem(int itemIndex)

Parameters

itemIndex

int

item's index

RemoveItem(int, params int[])

Removes the ChartAxisItems at the specified indexes.

Declaration

cs-api-definition
public void RemoveItem(int index, params int[] indexes)

Parameters

index

int

indexes

int[]

RemoveLastItem()

Removes the last item from the axis.

Declaration

cs-api-definition
public void RemoveLastItem()

ResetMaxValue()

Resets the MaxValue to default

Declaration

cs-api-definition
protected void ResetMaxValue()

ResetMinValue()

Resets the MinValue to default

Declaration

cs-api-definition
protected void ResetMinValue()

ResetStep()

Resets the Step value to default

Declaration

cs-api-definition
protected void ResetStep()

SaveViewState()

Saves data to a State Bag

Declaration

cs-api-definition
protected override object SaveViewState()

Returns

object

Saved axis data to a state bag

Overrides StateManagedObject.SaveViewState()

SetItemColor(int, Color)

Sets new color for the axis item text at the specified position.

Declaration

cs-api-definition
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

cs-api-definition
public void SetItemLabel(int itemIndex, ChartAxisItem newLabel)

Parameters

itemIndex

int

Item index in collection

newLabel

ChartAxisItem

Axis item

SetItemLabel(int, string)

Sets new label text for the axis item at the specified position.

Declaration

cs-api-definition
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

cs-api-definition
protected void SetMaxValue(double maxValue)

Parameters

maxValue

double

Value to set

SetMinValue(double)

Sets the min axis range value

Declaration

cs-api-definition
protected void SetMinValue(double minValue)

Parameters

minValue

double

Value to set

ShouldSerializeMaxValue()

The axis MaxValue design time serialization reason

Declaration

cs-api-definition
protected bool ShouldSerializeMaxValue()

Returns

bool

True is value have to be serialized

ShouldSerializeMinValue()

The axis MinValue design time serialization reason

Declaration

cs-api-definition
protected bool ShouldSerializeMinValue()

Returns

bool

True is value have to be serialized

ShouldSerializeStep()

The axis Step design time serialization reason

Declaration

cs-api-definition
protected bool ShouldSerializeStep()

Returns

bool

True is value have to be serialized

TrackViewState()

Tracking ViewState

Declaration

cs-api-definition
protected override void TrackViewState()

Overrides StateManagedObject.TrackViewState()