Skip to main content

OptionScalesAxesY

Namespace: Wisej.Web.Ext.ChartJS

Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)

Represents the options for the scale Y axes.

public class OptionScalesAxesY : OptionScalesAxes

The default Type of a y-axis is Linear.

Example:

var yAxis = new OptionScalesAxesY { Position = HeaderPosition.Right };
yAxis.Ticks.BeginAtZero = true;
this.chartJS1.Options.Scales.yAxes = new[] { yAxis };

Constructors​

Instance member OptionScalesAxesY()​

Default constructor.

Example:

var yAxis = new OptionScalesAxesY();
yAxis.ScaleLabel.LabelString = "Temperature (°C)";
this.chartJS1.Options.Scales.yAxes = new[] { yAxis };

Instance member OptionScalesAxesY(owner)​

Constructs a new instance of the OptionScalesAxesY set.

NameTypeDescription
ownerOptionsBaseThe OptionsBase set of options that owns this instance.

Example:

var scales = this.chartJS1.Options.Scales;
var yAxis = new OptionScalesAxesY(scales);
yAxis.Ticks.Mirror = true;

Properties​

Instance member LabelRotation​

Int32: Rotation value of the Y Axis labels, in degrees.

Value: Default is 0.

Setting a value greater than 0 sets both MinRotation and MaxRotation of Ticks to the value and turns off AutoSkip, so that all labels are rotated by the same angle. Setting it to 0 turns AutoSkip back on but leaves the rotation values unchanged.

Example:

var yAxis = ((BarOptions)this.chartJS1.Options).Scales.yAxes[0];
yAxis.LabelRotation = 30;

Instance member Position​

HeaderPosition: Position of the Y axes scale. (Default: Left)

Value: One of the HeaderPosition values. Default is Left.

Maps to the Chart.js position option of the axis. Use Left or Right for a y-axis.

Example:

var yAxis = ((LineOptions)this.chartJS1.Options).Scales.yAxes[0];
yAxis.Position = HeaderPosition.Right;