`[C#] ` | `public void setAxisAtOrigin([ int originMode [, int symmetryMode ]]);` |

`[VB] ` | `Public Sub setAxisAtOrigin([ originMode As Integer [, symmetryMode As Integer ]])` |

ChartDirector 6.2 (.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:

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.

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:

Constant | Value | Description |
---|---|---|

XAxisAtOrigin | 1 | Move the x-axis so that it will intersect with the zero point of the y-axis, if that point exists. |

YAxisAtOrigin | 2 | Move the y-axis so that it will intersect with the zero point of the x-axis, if that point exists. |

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

Constant | Value | Description |
---|---|---|

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

XAxisSymmetricIfNeeded | 2 | Adjust the x-axis will be symmetrical about the zero point if the axis scale needs both positive and negative values. |

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

YAxisSymmetricIfNeeded | 8 | Adjust the y-axis will be symmetrical about the zero point if the axis scale needs both positive and negative values. |

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

XYAxisSymmetricIfNeeded | 32 | 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

Argument | Default | Description |
---|---|---|

originMode | XYAxisAtOrigin | predefined constants to determine which axis needs to move to intersect with the zero point of the other axis. |

symmetryMode | 0 | Flags to determine if the axes need to be symmetrical about the origin. |

Return Value

None

© 2017 Advanced Software Engineering Limited. All rights reserved.