Highcharts .NET  11.3.0
Highsoft.Web.Mvc.Charts.YAxisLabels Class Reference

Inherits BaseObject.

Properties

YAxisLabelsAlign Align [get, set]
 What part of the string the given position is anchored to. Canbe one of "left", "center" or "right". The exact positionalso depends on the labels.x setting.Angular gauges and solid gauges defaults to "center".Solid gauges with two labels have additional option "auto"for automatic horizontal and vertical alignment. More...
 
bool AllowOverlap [get, set]
 Whether to allow the axis labels to overlap. When false,overlapping labels are hidden. More...
 
List< double > AutoRotation [get, set]
 For horizontal axes, the allowed degrees of label rotationto prevent overlapping labels. If there is enough space,labels are not rotated. As the chart gets narrower, itwill start rotating the labels -45 degrees, then removeevery second label and try again with rotations 0 and -45 etc.Set it to undefined to disable rotation, which willcause the labels to word-wrap if possible. Defaults to [-45]on bottom and top axes,undefined` on left and right axes. More...
 
double AutoRotationLimit [get, set]
 When each category width is more than this many pixels, we don'tapply auto rotation. Instead, we lay out the axis label with wordwrap. A lower limit makes sense when the label contains multipleshort words that don't extend the available horizontal space foreach label. More...
 
string Distance [get, set]
 The label's pixel distance from the perimeter of the plot area.On cartesian charts, this is overridden if the labels.y settingis set.On polar charts, if it's a percentage string, it is interpretedthe same as series.radius, so thelabel can be aligned under the gauge's shape. More...
 
double DistanceNumber [get, set]
 The label's pixel distance from the perimeter of the plot area.On cartesian charts, this is overridden if the labels.y settingis set.On polar charts, if it's a percentage string, it is interpretedthe same as series.radius, so thelabel can be aligned under the gauge's shape. More...
 
bool Enabled [get, set]
 Enable or disable the axis labels. More...
 
string Format [get, set]
 A format string for the axis label. The context is available asformat string variables. For example, you can use {text} toinsert the default formatted text. The recommended way of addingunits for the label is using text, for example {text} km.To add custom numeric or datetime formatting, use {value} withformatting, for example {value:.1f} or {value:Y-m-d}.Seeformat stringfor more examples of formatting.The default value is not specified due to the dynamicnature of the default implementation. More...
 
string Formatter [get, set]
 Callback JavaScript function to format the label. The valueis given by this.value. Additional properties for this areaxis, chart, isFirst, isLast and text which holds thevalue of the default formatter.Defaults to a built in function returning a formatted stringdepending on whether the axis is category, datetime,numeric or other. More...
 
double MaxStaggerLines [get, set]
 Horizontal axis only. When staggerLines is not set,maxStaggerLines defines how many lines the axis is allowed toadd to automatically avoid overlapping X labels. Set to 1 todisable overlap detection. More...
 
YAxisLabelsOverflow Overflow [get, set]
 How to handle overflowing labels on horizontal axis. If set to"allow", it will not be aligned at all. By default it"justify" labels inside the chart area. If there is room tomove it, it will be aligned to the edge, else it will be removed. More...
 
double Padding [get, set]
 The pixel padding for axis labels, to ensure white space betweenthem. More...
 
YAxisLabelsPosition3d Position3d [get, set]
 Defines how the labels are be repositioned according to the 3Dchart orientation.- ‘'offset’: Maintain a fixed horizontal/vertical distance from the tick marks, despite the chart orientation. This is the backwards compatible behavior, and causes skewing of X and Z axes.-'chart': Preserve 3D position relative to the chart. This looks nice, but hard to read if the text isn't forward-facing.-'flap': Rotated text along the axis to compensate for the chart orientation. This tries to maintain text as legible as possible on all orientations.-'ortho': Rotated text along the axis direction so that the labels are orthogonal to the axis. This is very similar to'flap'`, but prevents skewing the labels (X and Y scaling are still present). More...
 
bool ReserveSpace [get, set]
 Whether to reserve space for the labels. By default, space isreserved for the labels in these cases:* On all horizontal axes.* On vertical axes if label.align is right on a left-sideaxis or left on a right-side axis.* On vertical axes if label.align is center.This can be turned off when for example the labels are renderedinside the plot area instead of outside. More...
 
double Rotation [get, set]
 Rotation of the labels in degrees. When undefined, theautoRotation option takes precedence. More...
 
bool Skew3d [get, set]
 If enabled, the axis labels will skewed to follow theperspective.This will fix overlapping labels and titles, but texts becomeless legible due to the distortion.The final appearance depends heavily on labels.position3d. More...
 
double StaggerLines [get, set]
 Horizontal axes only. The number of lines to spread the labelsover to make room or tighter labels. 0 disables staggering. More...
 
double Step [get, set]
 To show only every n'th label on the axis, set the step to n.Setting the step to 2 shows every other label.By default, when 0, the step is calculated automatically to avoidoverlap. To prevent this, set it to 1. This usually onlyhappens on a category axis, and is often a sign that you havechosen the wrong axis type.Read more atAxis docs=> What axis should I use? More...
 
Hashtable Style [get, set]
 CSS styles for the label. Use ‘whiteSpace: 'nowrap’to preventwrapping of category labels. UsetextOverflow: 'none'toprevent ellipsis (dots).In styled mode, the labels are styled with the.highcharts-axis-labels` class. More...
 
bool UseHTML [get, set]
 Whether to use HTMLto render the labels. More...
 
double X [get, set]
 The x position offset of all labels relative to the tickpositions on the axis. Defaults to -15 for left axis, 15 forright axis. More...
 
double Y [get, set]
 The y position offset of all labels relative to the tickpositions on the axis. For polar and radial axis consider the useof the distance option. More...
 
double ZIndex [get, set]
 The Z index for the axis labels. More...
 
Hashtable CustomFields [get, set]
 

Property Documentation

◆ Align

YAxisLabelsAlign Highsoft.Web.Mvc.Charts.YAxisLabels.Align
getset

What part of the string the given position is anchored to. Canbe one of "left", "center" or "right". The exact positionalso depends on the labels.x setting.Angular gauges and solid gauges defaults to "center".Solid gauges with two labels have additional option "auto"for automatic horizontal and vertical alignment.

◆ AllowOverlap

bool Highsoft.Web.Mvc.Charts.YAxisLabels.AllowOverlap
getset

Whether to allow the axis labels to overlap. When false,overlapping labels are hidden.

◆ AutoRotation

List<double> Highsoft.Web.Mvc.Charts.YAxisLabels.AutoRotation
getset

For horizontal axes, the allowed degrees of label rotationto prevent overlapping labels. If there is enough space,labels are not rotated. As the chart gets narrower, itwill start rotating the labels -45 degrees, then removeevery second label and try again with rotations 0 and -45 etc.Set it to undefined to disable rotation, which willcause the labels to word-wrap if possible. Defaults to [-45]on bottom and top axes,undefined` on left and right axes.

◆ AutoRotationLimit

double Highsoft.Web.Mvc.Charts.YAxisLabels.AutoRotationLimit
getset

When each category width is more than this many pixels, we don'tapply auto rotation. Instead, we lay out the axis label with wordwrap. A lower limit makes sense when the label contains multipleshort words that don't extend the available horizontal space foreach label.

◆ Distance

string Highsoft.Web.Mvc.Charts.YAxisLabels.Distance
getset

The label's pixel distance from the perimeter of the plot area.On cartesian charts, this is overridden if the labels.y settingis set.On polar charts, if it's a percentage string, it is interpretedthe same as series.radius, so thelabel can be aligned under the gauge's shape.

◆ DistanceNumber

double Highsoft.Web.Mvc.Charts.YAxisLabels.DistanceNumber
getset

The label's pixel distance from the perimeter of the plot area.On cartesian charts, this is overridden if the labels.y settingis set.On polar charts, if it's a percentage string, it is interpretedthe same as series.radius, so thelabel can be aligned under the gauge's shape.

◆ Enabled

bool Highsoft.Web.Mvc.Charts.YAxisLabels.Enabled
getset

Enable or disable the axis labels.

◆ Format

string Highsoft.Web.Mvc.Charts.YAxisLabels.Format
getset

A format string for the axis label. The context is available asformat string variables. For example, you can use {text} toinsert the default formatted text. The recommended way of addingunits for the label is using text, for example {text} km.To add custom numeric or datetime formatting, use {value} withformatting, for example {value:.1f} or {value:Y-m-d}.Seeformat stringfor more examples of formatting.The default value is not specified due to the dynamicnature of the default implementation.

◆ Formatter

string Highsoft.Web.Mvc.Charts.YAxisLabels.Formatter
getset

Callback JavaScript function to format the label. The valueis given by this.value. Additional properties for this areaxis, chart, isFirst, isLast and text which holds thevalue of the default formatter.Defaults to a built in function returning a formatted stringdepending on whether the axis is category, datetime,numeric or other.

◆ MaxStaggerLines

double Highsoft.Web.Mvc.Charts.YAxisLabels.MaxStaggerLines
getset

Horizontal axis only. When staggerLines is not set,maxStaggerLines defines how many lines the axis is allowed toadd to automatically avoid overlapping X labels. Set to 1 todisable overlap detection.

◆ Overflow

YAxisLabelsOverflow Highsoft.Web.Mvc.Charts.YAxisLabels.Overflow
getset

How to handle overflowing labels on horizontal axis. If set to"allow", it will not be aligned at all. By default it"justify" labels inside the chart area. If there is room tomove it, it will be aligned to the edge, else it will be removed.

◆ Padding

double Highsoft.Web.Mvc.Charts.YAxisLabels.Padding
getset

The pixel padding for axis labels, to ensure white space betweenthem.

◆ Position3d

YAxisLabelsPosition3d Highsoft.Web.Mvc.Charts.YAxisLabels.Position3d
getset

Defines how the labels are be repositioned according to the 3Dchart orientation.- ‘'offset’: Maintain a fixed horizontal/vertical distance from the tick marks, despite the chart orientation. This is the backwards compatible behavior, and causes skewing of X and Z axes.-'chart': Preserve 3D position relative to the chart. This looks nice, but hard to read if the text isn't forward-facing.-'flap': Rotated text along the axis to compensate for the chart orientation. This tries to maintain text as legible as possible on all orientations.-'ortho': Rotated text along the axis direction so that the labels are orthogonal to the axis. This is very similar to'flap'`, but prevents skewing the labels (X and Y scaling are still present).

◆ ReserveSpace

bool Highsoft.Web.Mvc.Charts.YAxisLabels.ReserveSpace
getset

Whether to reserve space for the labels. By default, space isreserved for the labels in these cases:* On all horizontal axes.* On vertical axes if label.align is right on a left-sideaxis or left on a right-side axis.* On vertical axes if label.align is center.This can be turned off when for example the labels are renderedinside the plot area instead of outside.

◆ Rotation

double Highsoft.Web.Mvc.Charts.YAxisLabels.Rotation
getset

Rotation of the labels in degrees. When undefined, theautoRotation option takes precedence.

◆ Skew3d

bool Highsoft.Web.Mvc.Charts.YAxisLabels.Skew3d
getset

If enabled, the axis labels will skewed to follow theperspective.This will fix overlapping labels and titles, but texts becomeless legible due to the distortion.The final appearance depends heavily on labels.position3d.

◆ StaggerLines

double Highsoft.Web.Mvc.Charts.YAxisLabels.StaggerLines
getset

Horizontal axes only. The number of lines to spread the labelsover to make room or tighter labels. 0 disables staggering.

◆ Step

double Highsoft.Web.Mvc.Charts.YAxisLabels.Step
getset

To show only every n'th label on the axis, set the step to n.Setting the step to 2 shows every other label.By default, when 0, the step is calculated automatically to avoidoverlap. To prevent this, set it to 1. This usually onlyhappens on a category axis, and is often a sign that you havechosen the wrong axis type.Read more atAxis docs=> What axis should I use?

◆ Style

Hashtable Highsoft.Web.Mvc.Charts.YAxisLabels.Style
getset

CSS styles for the label. Use ‘whiteSpace: 'nowrap’to preventwrapping of category labels. UsetextOverflow: 'none'toprevent ellipsis (dots).In styled mode, the labels are styled with the.highcharts-axis-labels` class.

◆ UseHTML

bool Highsoft.Web.Mvc.Charts.YAxisLabels.UseHTML
getset

Whether to use HTMLto render the labels.

◆ X

double Highsoft.Web.Mvc.Charts.YAxisLabels.X
getset

The x position offset of all labels relative to the tickpositions on the axis. Defaults to -15 for left axis, 15 forright axis.

◆ Y

double Highsoft.Web.Mvc.Charts.YAxisLabels.Y
getset

The y position offset of all labels relative to the tickpositions on the axis. For polar and radial axis consider the useof the distance option.

◆ ZIndex

double Highsoft.Web.Mvc.Charts.YAxisLabels.ZIndex
getset

The Z index for the axis labels.


The documentation for this class was generated from the following file: