|
|
|
|
|
- Marks on axes
- Types of charts
- Restoring the default values
grOrigin (Function) In french: grOrigine Modifies the start and end marks on one of the chart axes. Remark: grOrigin is used to view a chart section by reducing the values displayed on the one of the axes.
// 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>: Control name or character string Name of the chart to be used. This name corresponds to:- the chart name defined through programming with grCreate.
- the name of the Chart control in the window, page or report editor.
<Minimum mark>: Real Start mark on the specified axis.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.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:
| | grSecondaryYCoordinate | Secondary Y-axis (vertical axis). | grXCoordinate (default value) | X-axis (horizontal axis). | grYCoordinate | Y-axis (vertical axis). | grZCoordinate | Z axis (Surface charts only). |
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 grInterval.
- 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 | The XAxisMax property gets the maximum value of the X-axis in a Chart control. This property can be used in the "Zoom" event of a Chart control to identify the section displayed. | XAxisMin | The XAxisMin property gets the minimum value of the X-axis in a Chart control. This property can be used in the "Zoom" event of a Chart control to identify the section displayed. | YAxisMax | The YAxisMax property gets the maximum value of the Y-axis in a Chart control. This property can be used in the "Zoom" event of a Chart control to identify the section displayed. | YAxisMin | The YAxisMin property gets the minimum value of the Y-axis in a Chart control. | ZAxisMax | The ZAxisMax property gets the maximum value of the Z-axis in a Chart control (Surface chart). | ZAxisMin | The ZAxisMin property gets the minimum value of the Z-axis in a Chart control (Surface chart). |
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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|