Blazor Axis Types
The Ignite UI for Blazor Category Chart uses only one IgbCategoryXAxis
and one IgbNumericYAxis
type. Similarly, Ignite UI for Blazor Financial Chart uses only one IgbTimeXAxis
and one IgbNumericYAxis
types. However, the Ignite UI for Blazor Data Chart provides support for multiple axis types that you can position on any side of the chart by setting axis location or even inside of the chart by using axis crossing properties. This topic goes over each one, which axes and series are compatible with each other, and some specific properties to the unique axes.
Cartesian Axes
The IgbDataChart
with Cartesian Axes, allows you to plot data in horizontal (X-axis) and vertical (X-axis) direction with 3 types of X-Axis
(IgbCategoryXAxis
, IgbNumericXAxis
, and IgbTimeXAxis
) and 2 types of Y-Axis (IgbCategoryYAxis
and IgbNumericYAxis
).
Category X-Axis
The IgbCategoryXAxis
treats its data as a sequence of categorical data items. It can display almost any type of data including strings and numbers. If you are plotting numbers on this axis, it is important to keep in mind that this axis is a discrete axis and not continuous. This means that each categorical data item will be placed equidistant from the one before it. The items will also be plotted in the order that they appear in the axis' data source.
The IgbCategoryXAxis
requires you to provide a DataSource
and a Label
in order to plot data with it. It is generally used with the IgbNumericYAxis
to plot the following type of series:
The following example demonstrates usage of the IgbCategoryXAxis
type:
Category Y-Axis
The IgbCategoryYAxis
works very similarly to the IgbCategoryXAxis
described above, but it is placed vertically rather than horizontally. Also, this axis requires you to provide a DataSource
and a Label
in order to plot data with it. The IgbCategoryYAxis
is generally used with the IgbNumericXAxis
to plot the following type of series:
The following example demonstrates usage of the IgbCategoryYAxis
type:
Numeric X-Axis
The IgbNumericXAxis
treats its data as continuously varying numerical data items. Labels on this axis are placed horizontally along the X-Axis. The location of the IgbNumericXAxis
labels depends on the XMemberPath
property of the various Scatter Series that it supports if combined with a IgbNumericYAxis
. Alternatively, if combined with the IgbCategoryXAxis
, these labels will be placed corresponding to the ValueMemberPath
of the IgbBarSeries
, IgbStackedBarSeries
, and IgbStacked100BarSeries
.
The IgbNumericXAxis
is compatible with the following type of series:
IgbBarSeries
IgbBubbleSeries
IgbHighDensityScatterSeries
IgbScatterSeries
IgbScatterLineSeries
IgbScatterSplineSeries
IgbScatterAreaSeries
IgbScatterContourSeries
IgbScatterPolylineSeries
IgbScatterPolygonSeries
IgbStackedBarSeries
IgbStacked100BarSeries
The following example demonstrates usage of the IgbNumericXAxis
:
Numeric Y-Axis
The IgbNumericYAxis
treats its data as continuously varying numerical data items. Labels on this axis are placed vertically along the Y-Axis. The location of the IgbNumericYAxis
labels depends on the YMemberPath
property of the various ScatterSeries that is supports if combined with a IgbNumericXAxis
. Alternatively, if combined with the IgbCategoryYAxis
, these labels will be placed corresponding to the ValueMemberPath
of the category or stacked series mentioned in the table above. If you are using one of the financial series, they will be placed corresponding to the Open/High/Low/Close paths and the series type that you are using.
The IgbNumericYAxis
is compatible with the following type of series:
The following example demonstrates usage of the IgbNumericYAxis
:
Time X Axis
The IgbTimeXAxis
treats its data as a sequence of data items, sorted by date. Labels on this axis type are dates and can be formatted and arranged according to date intervals. The date range of this axis is determined by the date values in a data column that is mapped using its DateTimeMemberPath
. This, along with a DataSource
is required to plot data with this axis type.
The IgbTimeXAxis
is the X-Axis type in the IgbFinancialChart
component.
Breaks in Time X Axis
The IgbTimeXAxis
has the option to exclude intervals of data by using Breaks
. As a result, the labels and plotted data will not appear at the excluded interval. For example, working/non-working days, holidays, and/or weekends. An instance of IgbTimeAxisBreak
can be added to the Breaks
collection of the axis and configured by using a unique Start
, End
and Interval
.
Formating in Time X Axis
The IgbTimeXAxis
has the LabelFormats
property, which represents a collection of IgbTimeAxisLabelFormat
objects. Each IgbTimeAxisLabelFormat
added to the collection is responsible for assigning a unique Format
and Range
. This can be especially useful for drilling down data from years to milliseconds and adjusting the labels depending on the range of time shown by the chart.
The Format
property of the IgbTimeAxisLabelFormat
specifies what format to use for a particular visible range. The Range
property of the IgbTimeAxisLabelFormat
specifies the visible range at which the axis label formats will switch to a different format. For example, if you have two IgbTimeAxisLabelFormat
elements with a range set to 10 days and another set to 5 hours, then as soon as the visible range of the axis becomes less than 10 days, it will switch to 5-hour format.
Intervals in Time X Axis
The IgbTimeXAxis
replaces the conventional Interval
property of the category and numeric axes with an Intervals
collection of type IgbTimeAxisInterval
. Each IgbTimeAxisInterval
added to the collection is responsible for assigning a unique Interval
, Range
and IntervalType
. This can be especially useful for drilling down data from years to milliseconds to provide unique spacing between labels depending on the range of time shown by the chart. A description of these properties is below:
Interval
: This specifies the interval to use. This is tied to theIntervalType
property. For example, if theIntervalType
is set toDays
, then the numeric value specified inInterval
will be in days.Range
: This specifies the visible range at which the axis interval will switch to a different interval. For example, if you have two TimeAxisInterval with a range set to 10 days and another set to 5 hours, as soon as the visible range in the axis becomes less than 10 days it will switch to the interval whose range is 5 hours.IntervalType
: This specifies the unit of time for theInterval
property.
Polar Axes
The IgbDataChart
with Polar Axes, allows you to plot data outwards (radius axis) from center of the chart and around (angle axis) of center of the chart.
Category Angle Axis
The IgbCategoryAngleAxis
treats its data as a sequence of category data items. The labels on this axis are placed along the edge of a circle according to their position in that sequence. This type of axis can display almost any type of data including strings and numbers.
The IgbCategoryAngleAxis
is generally used with the IgbNumericRadiusAxis
to plot Radial Series.
The following example demonstrates usage of the IgbCategoryAngleAxis
type:
Proportional Category Angle Axis
The IgbProportionalCategoryAngleAxis
treats its data as a sequence of category data items. The labels on this axis are placed along the edge of a circle according to their position in that sequence. This type of axis can display almost any type of data including strings and numbers.
The IgbProportionalCategoryAngleAxis
is generally used with the IgbNumericRadiusAxis
to plot a pie chart eg. Radial Series.
The following example demonstrates usage of the IgbProportionalCategoryAngleAxis
type:
Numeric Angle Axis
The IgbNumericAngleAxis
treats its data as continuously varying numerical data items. The labels on this axis area placed along a radius line starting from the center of the circular plot. The location of the labels on the IgbNumericAngleAxis
varies according to the value in the data column mapped using the RadiusMemberPath
property of the Polar Series object or the ValueMemberPath
property of the Radial Series object.
The The IgbNumericAngleAxis
can be used with either the IgbCategoryAngleAxis
to plot Radial Series or with the IgbNumericRadiusAxis
to plot Polar Series respectively.
The following example demonstrates usage of the IgbNumericAngleAxis
type:
Numeric Radius Axis
The IgbNumericRadiusAxis
treats the data as continuously varying numerical data items. The labels on this axis are placed around the circular plot. The location of the labels varies according to the value in a data column mapped using the AngleMemberPath
property of the corresponding polar series.
The IgbNumericRadiusAxis
can be used with the IgbNumericRadiusAxis
to plot Polar Series.
The following example demonstrates usage of the IgbNumericRadiusAxis
type:
Additional Resources
You can find more information about related chart features in these topics: