- Marks on axes
- Types of charts
- Restoring the default values
grOrigin (Function) In french: grOrigine
// Modify the start and end marks on the horizontal axis // of "MyChart". The mark will go from 5 to 12. grOrigin("MyChart", 5, 12, grXCoordinate) grDraw("MyChart")
// Modify the start and end marks on the vertical axis of "CHART_Chart" control // The mark will go from 500 to 1000 // Restore the default values // Initialize the window gnYMin is int gnYMax is int // Button for modifying the mark gnYMin = CHART_Chart..YAxisMin gnYMax = CHART_Chart..YAxisMax grOrigin(CHART_Chart, 500, 1000, grYCoordinate) grDraw(CHART_Chart) // Button for restoring the mark grOrigin(CHART_Chart, gnYMin, gnYMax, grYCoordinate) grDraw(CHART_Chart)
Syntax
grOrigin(<Chart name> , <Minimum mark> [, <Maximum mark> [, <Type of axis>]])
<Chart name>: Character string (with or without quotes) Name of chart to use. This name corresponds to:- the chart name defined by programming with grCreate.
- the name of Chart control found in the window editor, page editor or report editor.
<Minimum mark>: Real Start mark on the specified axis. Versions 23 and laterThis parameter can also correspond to a duration, a date, a time or a date-time. New in version 23This parameter can also correspond to a duration, a date, a time or a date-time. This parameter can also correspond to a duration, a date, a time or a date-time. <Maximum mark>: Optional real End mark on the specified axis. If this parameter is not specified, <Maximum mark> corresponds to the maximum value of chart data. Versions 23 and laterThis parameter can also correspond to a duration, a date, a time or a date-time. New in version 23This parameter can also correspond to a duration, a date, a time or a date-time. This parameter can also correspond to a duration, a date, a time or a date-time. <Type of axis>: Optional constant Axis for which the marks must be modified:
| | grXCoordinate (default value) | X axis (horizontal axis). | Versions 18 and latergrZCoordinate New in version 18grZCoordinate grZCoordinate | Z axis (Surface charts only). | grYCoordinate | Y axis (vertical axis). | grSecondaryYCoordinate | Secondary Y axis (vertical axis). |
Remarks Marks on axes - X axis (horizontal axis): <Maximum mark> and <Minimum mark> correspond to the maximum and minimum data values in the series displayed.
- Y axis (vertical axis): <Minimum mark> and <Maximum mark> correspond to the minimum and maximum data values.
- Limits: 100 marks above and 100 marks below the X axis.
- To modify the frequency of marks on the horizontal or vertical axis of a chart, use grGraduate.
- The data defined by grOrigin will be taken into account during the next call to grDraw.
Types of charts The marks on axes have no effect on the Pie charts. Restoring the default values To restore the display of the chart before the origin was modified, the minimum and maximum values of axes must be saved. These values can be known via the following properties:
| | XAxisMax | ..XAxisMax is used to find out the upper bound on the X axis for a Chart control. This property can be used in the zoom process of a chart to identify the section displayed. | XAxisMin | ..XAxisMin is used to find out the lower bound on the X axis for a Chart control. This property can be used in the zoom process of a chart to identify the section displayed. | YAxisMax | ..YAxisMax is used to find out the upper bound on the Y axis for a Chart control. This property can be used in the zoom process of a chart to identify the section displayed. | YAxisMin | ..YAxisMin is used to find out the lower bound on the Y axis for a Chart control. | ZAxisMax | ..ZAxisMax is used to find out the upper bound of altitudes (Z axis) for a Chart control (Surface chart). | ZAxisMin | ..ZAxisMin is used to find out the lower bound of altitudes (Z axis) for a Chart control (Surface chart). |
Versions 20 and later New in version 20
Related Examples:
|
Unit examples (WINDEV): The Chart functions
[ + ] Using the main chart designer features of WINDEV: - Create a Pie, Column or Line chart - Define the display area of a chart - Define the chart options (legend, percentage, ...) - Draw a line on a chart
|
This page is also available for…
|
|
|