OptionScalesAxesY
Namespace: Wisej.Web.Ext.ChartJS
Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)
Represents the options for the scale Y axes.
- C#
- VB.NET
public class OptionScalesAxesY : OptionScalesAxes
Public Class OptionScalesAxesY
Inherits 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
OptionScalesAxesY()
Default constructor.
Example:
var yAxis = new OptionScalesAxesY();
yAxis.ScaleLabel.LabelString = "Temperature (°C)";
this.chartJS1.Options.Scales.yAxes = new[] { yAxis };
OptionScalesAxesY(owner)
Constructs a new instance of the OptionScalesAxesY set.
| Name | Type | Description |
|---|---|---|
| owner | OptionsBase | The 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
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;
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;