PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Modifies the start and end marks on one of the chart axes.
Remark: <Chart>.Origin is used to view a chart section by reducing the values displayed on the one of the axes.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
Example
// 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
CHART_Chart.Origin(500, 1000, grYCoordinate)
CHART_Chart.Draw()
 
// Button for restoring the mark
CHART_Chart.Origin(gnYMin, gnYMax, grYCoordinate)
CHART_Chart.Draw()
Syntax
<Chart name>.grOrigin_object(<Minimum mark> [, <Maximum mark> [, <Type of axis>]])
<Chart name>: Control name
Name of the Chart control to use (in the window, page or report editor).
PHP Only the interactive Chart controls are available.
<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:
grSecondaryYCoordinateSecondary Y-axis (vertical axis).
grXCoordinate
(default value)
X-axis (horizontal axis).
grYCoordinateY-axis (vertical axis).
grZCoordinateZ axis (Surface charts only).
Universal Windows 10 AppAndroid This constant is not available.
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 <Chart>.Graduate.
  • The data defined by <Chart>.Origin will be taken into account during the next call to <Chart>.Draw.

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:
XAxisMaxThe 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.
XAxisMinThe XAxisMin property is used to determine the lower bound of the X-axis in a Chart control. This property can be used in the event "Zoom" of a Chart control to identify the section displayed.
YAxisMaxThe YAxisMax property is used to determine the upper bound of the Y-axis in a Chart control. This property can be used in the event "Zoom" of a Chart control to identify the section displayed.
YAxisMinThe YAxisMin property is used to determine the lower bound of the Y-axis in a Chart control.
ZAxisMaxThe ZAxisMax property is used to determine the upper bound of the Z-axis in a Chart control (Surface chart).
ZAxisMinThe ZAxisMin property is used to determine the lower bound of the Z-axis in a Chart control (Surface chart).
WINDEVAndroidiPhone/iPadIOS WidgetMac Catalyst Remark: <Chart>.Zoom can also be used to view a section of the chart. However, the final user can restore the initial configuration via the context menu of the chart ("Initial zoom").
Related Examples:
The Chart functions 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
Component: wd280grf.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment