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

# Working with Chart Object Coordinates

## Understanding Chart Canvas Coordinates

The chart canvas represents the portion of a chart window on which objects can be painted (the area outlined in blue in the image below). The canvas area is measured by an x-axis and y-axis independent of the price and time-axis of the chart itself. When working with coordinates on a chart canvas, it is important to note that the origin point (coordinates 0,0) is in the top-left corner of the canvas, NOT the bottom-left. Moving down the canvas increases the y-coordinate, and moving the the right on the canvas increases the x-coordinate.

![ChartControl\_XY](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/8132d5760a6a3e4efb83fa987cb5c192a2c5a84723cf44187d78c5d0aeb7aabe/docs/assets/developer/desktop-sdk/guides/working-with-chart-object-coordinates-chartcontrol-xy.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=20260729T070541Z&X-Amz-Expires=604800&X-Amz-Signature=3af2ca5de475ae133b174aeb505993243f43499a572dbf0528ade913f5d00c3e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Understanding Chart Areas

When using ChartControl properties and methods, it is important to understand the layout of a chart window, and which specific area of the window is being measured by a specific property. The image below shows the three primary areas of a chart window.

![ChartControl\_Measurements](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/ecbc9c86c188914bee030ea3d437440a8437a3a915ef99a2f42a78e1055ef9e2/docs/assets/developer/desktop-sdk/guides/working-with-chart-object-coordinates-chartcontrol-measurements.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=20260729T070541Z&X-Amz-Expires=604800&X-Amz-Signature=57271c17311a4fe993dd1ddaa47519f21d86ea145c275b6ef0e9981de72a6e09&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

The three regions shaded in the image above are labeled as follows:

1. The chart canvas covers the area in which bars, drawing objects, and indicator plots can be painted. It is bounded on the bottom by the x-axis, and on the right, left, or both by the y-axis. This is measured by properties such as [CanvasLeft](/developer/desktop-sdk/references/common/charts/chartcontrol/canvasleft) and [CanvasRight](/developer/desktop-sdk/references/common/charts/chartcontrol/canvasright).

2. The y-axis extends vertically from the chart's horizontal scroll bar to the top of the chart canvas, and can be displayed to the right or left (or both) of the canvas area, depending the "Scale Justification" properties of the [Bars](/developer/desktop-sdk/references/common/bars) object or indicators painted on the chart. This is measured by properties such as [AxisYLeftWidth](/developer/desktop-sdk/references/common/charts/chartcontrol/axisyleftwidth) and [AxisYRightWidth](/developer/unsorted/axisyrightwidth).

3. The x-axis sits beneath the chart canvas, and extends horizontally from the left edge of the chart canvas (or the left edge of the y-axis if it is visible on the left) to the right edge of the y-axis applied to the right of the canvas (or the right edge of the canvas itself if the y-axis is not visible on the right). This is measured by properties such as [AxisXHeight](/developer/desktop-sdk/references/common/charts/chartcontrol/axisxheight).