> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# AxisYRightWidth

## Definition

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

## Property Value

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

## Syntax

`\<chartcontrol\>.AxisYRightWidth`

## Example

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
     // Print the number of pixels between the y-axis and the right edge of the chart
     double rightWidth = chartControl.AxisYRightWidth;
     Print(rightWidth);
}
```

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

![ChartControl\_AxisYRightWidth](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/8da8e42bf85b4763f095dc3a2c6896fdd06c8cb1db7b4ff9db9a8768a754d64c/docs/assets/developer/desktop-sdk/references/axisyrightwidth-chartcontrol-axisyrightwidth.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260729T062102Z&X-Amz-Expires=604800&X-Amz-Signature=7c03ac9d4bb3a9fdfc2b6276fac594d1e11de0fb7efcf7b3815c2f07d01d7192&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

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