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

# X (Coordinate)

## Definition

Indicates the **x-coordinate** on the chart canvas at which the chart panel begins.

## Property Value

A **int** representing the **x-coordinate** at which the panel begins. This property will only contain a value greater than zero if the y-axis displays to the left of the paintable chart canvas area in the panel (if an object in the panel is using the "Left" scale justification).

## Syntax

`ChartPanel.X`

## Example

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)  
{  
  base.OnRender(chartControl, chartScale);  
     
  // Print the coordinates of the top-left corner of the panel  
  Print(String.Format("The panel begins at coordinates {0},{1}",ChartPanel.X ,ChartPanel.Y));  
}
```

Based on the image below, X reveals that the chart panel begins at x-coordinate 52.

![chartpanel\_x](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/b86688209e1faa28bd57550858e7ad28c50c147f4de852f868d1b9d33967bbbc/docs/assets/developer/desktop-sdk/references/x-coordinate-chartpanel-chartpanel-x.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=20260729T070801Z&X-Amz-Expires=604800&X-Amz-Signature=44c19383a89301c1cc0c3a8fe0bd0a52727fef442b19e89b8b89bb67ac08eab2&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)