AxisYLeftWidth

View as Markdown

Definition

Measures the distance (in pixels) between the y-axis and the left edge of a chart.

Property Value

A double representing the number of pixels separating the y-axis and the left edge of the chart.

Syntax

ChartControl.AxisYLeftWidth

Example

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 // Print the number of pixels between the y-axis and the left edge of the chart
4 double leftWidth = chartControl.AxisYLeftWidth;
5 Print(leftWidth);
6}

Based on the image below, AxisYLeftWidth reveals that the space between the y-axis and the left edge of the chart is 53 pixels on this chart.

ChartControl_AxisYLeftWidth

When there are no left-justified data series on a chart, AxisYLeftWidth will return 0, as there will be no space between the y-axis and the left margin.