The Xceed Chart for WinForms has two types of coordinate systems, which are used for locating the different elements of the scene:
-
The "canvas" or control viewport coordinate system is used for objects like labels, legends, watermarks, etc. The center of this coordinate system is located at the left top corner of the canvas. Figure 1 represents the canvas coordinate system. Note that the control viewport differs from the control client area if there is an applied image or standard border.
figure 1.
-
The "chart" or model coordinate system is used for chart objects and their elements, such as walls, axes and series. Each chart object has its own coordinate system, the center of which coincides with the center of the chart. Figure 2 represents the coordinate system of a chart.
figure 2
Coordinates and Measurement Units
The sizes and positions of Chart Elements are specified in four different types of units:
-
Percentage: Chart elements that need to be dynamically resized based on the Chart Image's width and height, as well as elements that are dependant on dynamic chart changes (series size, data point count, etc.), are often specified in percentages.
For example, the position of the Header text is determined by an origin point whose coordinates (X, Y) are specified as a percentage of the Chart Image's width and height.
Another example is the depth of bars: this is specified as a percentage of the series depth (determined dynamically based on the series count).
-
Pixel: Element properties that need to be defined in exact pixel size independently of the Chart Image's size are specified in pixels.
For example, the inflate value of the text frame's width and height is specified in pixels, because the user has to be precise in this setting, which is most commonly performed as an adjustment for a specific Chart Image size. All property-specified pixels and font sizes in Xceed Chart can be synchronously scaled using the Scale2DObjects property defining a scale factor as a percentage, where 100% means no scaling.
-
Model: Chart elements that are displayed in 3D Layers (for example, the Chart itself) use these measurement units. In general, Xceed Chart for WinForms builds a 3D Model of the chart and renders it. The size of Model units in Pixels is dependant on the chart projection, chart margins, and chart margin fit mode that are used.
For example, the Chart parallelepiped width, height, and depth are specified in Model units.
Another example is the Marker's width and height, which are also specified in Model units.
In certain projections, you can think of model units as percentages. For more information, consult the Chart Area Margins topic.
-
Scale: Scale units are units that are scaled on the Chart Axes. In fact, all data displayed by the Series are in Scale units. Scale units are internally converted to Model units by the Axis Scales.
For example, a bar data point with value 10 can be 150 pixels in height if the values contained by the bar series range from 0 to 20. If the values contained by the same bar series range from 0 to 40, the same bar will be 75 pixels in height, although its value will still be 10.