> 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.

# CanvasRight

## Definition

Indicates the x-coordinate (in pixels) of the end of the chart canvas area.

## Property Value

A double representing the end of the chart canvas area.

## Syntax

`\<chartcontrol\>.CanvasRight`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   // Store the beginning and ending x-coordinates of the canvas area
   double canvasBeginCoordinate = chartControl.CanvasLeft;
   double canvasEndCoordinate = chartControl.CanvasRight;
 
   // Print the stored values
   Print(String.Format("Chart canvas begins at x-coordinate {0} and ends at x-coordinate {1}", canvasBeginCoordinate, canvasEndCoordinate)); 
}
```

Based on the image below, CanvasRight reveals that the chart canvas ends at x-coordinate 526.

![ChartControl\_CanvasRight](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/47b94d3be288eb224e0ab5c713f1253d6c096afbf4dc7f67f4ac0165e182677f/docs/assets/developer/desktop-sdk/references/canvasright-chartcontrol-canvasright.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=20260729T070658Z&X-Amz-Expires=604800&X-Amz-Signature=6e233dbb3540f68d4776c61e7a9a2ca5262422c42f0e7d8bdada36fd62e04569&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)