ChartDirector 7.1 (.NET Edition)

XYChart.setAxisAtOrigin


Usage

[C#]public void setAxisAtOrigin([ int originMode [, int symmetryMode ]]);
[VB]Public Sub setAxisAtOrigin([ originMode As Integer [, symmetryMode As Integer ]])

Description

Sets the chart into 4 quadrant mode. The axes may intersect at origin inside the plot area (as opposed to at the border of the plot area).

By default, ChartDirector puts the axes at the border of the plot area. This ensures the axes and the axes labels will not block the contents of the plot area.

However, in some cases, it may be desirable for the axes to intersect at the origin. The axes may need to move inside the plot area.

ChartDirector allows you to move the primary x-axis and/or y-axis to so that they intersect with the zero point of the other axis. The following constants represent different possibilities:

ConstantValueDescription
XAxisAtOrigin1 Move the x-axis so that it will intersect with the zero point of the y-axis, if that point exists.
YAxisAtOrigin2 Move the y-axis so that it will intersect with the zero point of the x-axis, if that point exists.
XYAxisAtOrigin3 Move the x-axis so that it will intersect with the zero point of the y-axis, if that point exists. Move the y-axis so that it will intersect with the zero point of the x-axis, if that point exists.

In addition to ensure the axes intersects at the origin, ChartDirector allows you to control if the axes are symmetrical about the origin with the following flags. Multiple flags can be specified by "or" them together.

ConstantValueDescription
XAxisSymmetric1 Adjust the x-axis so that it becomes symmetrical about the zero point, that is, the positive and negative part of the x-axis will be of the same length.
XAxisSymmetricIfNeeded2 Adjust the x-axis will be symmetrical about the zero point if the axis scale needs both positive and negative values.
YAxisSymmetric4 Adjust the y-axis so that it becomes symmetrical about the zero point, that is, the positive and negative part of the y-axis will be of the same length.
YAxisSymmetricIfNeeded8 Adjust the y-axis will be symmetrical about the zero point if the axis scale needs both positive and negative values.
XYAxisSymmetric16 Adjust the x-axes and y-axes so that they become symmetrical about the zero point. The positive and negative parts of the x-axes and the y-axes will all be of the same length.
XYAxisSymmetricIfNeeded32 Adjust the x-axes and y-axes so that they become symmetrical about the zero point. However, if an axis does not need both positive and negative values, it will not be adjusted.

Arguments

ArgumentDefaultDescription
originModeXYAxisAtOriginpredefined constants to determine which axis needs to move to intersect with the zero point of the other axis.
symmetryMode0Flags to determine if the axes need to be symmetrical about the origin.

Return Value

None