PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Creating and drawing a chart by programming
  • Drawing several charts at the same time
  • Charts and threads
  • Default values of a chart created by programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Creates a specific type of chart.
Notes:
  • We recommend that you create a Chart control directly rather than using grCreate. Indeed, the Chart control offers many more features.
  • This function can only be used to create a chart by programming. This function cannot be used in the window editor, page editor or report editor.
Versions 15 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
New in version 15
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Create a column chart
// (and save the parameters modified by the user)
grCreate("MyChart", grColumn)
Syntax
grCreate(<Chart Name> , <Type of Chart> [, <Persistence>])
<Chart Name>: Character string (with quotes)
Name of chart to create. This name will be used by all functions for chart management. Caution: this name must not correspond to the name of a Chart control.
<Type of Chart>: Constant
Specifies the type of chart to create:
gr3DSAreaStacked3D chart of stacked areas.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSAreaDepth3D chart of areas represented in perspective.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSLine3D line chart.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSCylinderColStacked3D stacked column chart.
The bars are represented by cylinders.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSCylinderColClustered3D grouped column chart
The bars are represented by cylinders.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSCylinderColDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by cylinders.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSColumnStacked3D stacked column chart.
The bars are represented by 3D rectangles. This type of chart does not support the negative values.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSColumnClustered3D grouped column chart.
The bars are represented by 3D rectangles.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSColumnDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by 3D rectangles.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSMinMax3D stock chart displaying the difference between the minimum stock value and the maximum stock value
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSScatter3D Scatter chart.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
gr3DSPie3D Pie chart.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
grAreaArea chart (see example of Area chart).
grBarChartsStock chart (see example of Stock chart).
grCandlestickCandlestick stock chart (see example of Stock chart).
grCurveLine chart (see example of Line chart).
grDonutDonut chart. See example of Donut chart.
Windows MobileUniversal Windows 10 App This constant is not available.
Versions 17 and later
grFunnel
New in version 17
grFunnel
grFunnel
Funnel chart. See example of Funnel chart.
Windows MobileUniversal Windows 10 App This constant is not available.
Versions 16 and later
grBubbleChart
New in version 16
grBubbleChart
grBubbleChart
Bubble chart (see example of bubble chart).
Versions 21 and later
grHeatMap
New in version 21
grHeatMap
grHeatMap
Heatmap chart (see example of Heatmap chart).
WEBDEV - Server codeWindows Mobile This constant is not available.
Windows Mobile This constant is not available.
grSemiCircularSemi-circular chart (see example of Semi-circular chart).
Windows MobileUniversal Windows 10 App This constant is not available.
grColumnColumn chart (see example of Column chart)
grColumnStackedStacked Column chart. This type of chart does not support the negative values.
grMinMaxStock chart displaying the difference between the minimum stock value and the maximum stock value (see example of Stock chart)
grScatterScatter chart (see example of Scatter chart)
grRadarRadar chart (see example of Radar chart).
grPiePie chart (see example of Pie chart)
Versions 20 and later
grSunburst
New in version 20
grSunburst
grSunburst
Sunburst chart. See example of Sunburst chart.
WEBDEV - Server codeiPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
Versions 18 and later
grSurface
New in version 18
grSurface
grSurface
Surface chart (see example of Surface chart).
WEBDEV - Server codeLinuxWindows MobileUniversal Windows 10 App This constant is not available.
Versions 19 and later
grWaterfall
New in version 19
grWaterfall
grWaterfall
Waterfall chart (see example of Waterfall chart).
The type of chart can be modified later by grType.
<Persistence>: Optional boolean
  • True (default value) to save the modifications made to the chart by the user via the popup menu,
  • False not to save these modifications.
Remarks

Creating and drawing a chart by programming

To create and draw a chart:

Drawing several charts at the same time

Several charts with the same name cannot exist at the same time.
To draw several charts at the same time (in one or more windows for example), different chart names must be specified.

Charts and threads

A single chart can be handled in a thread.
Consequences:
  • Two threads cannot handle the same chart.
  • A chart created in a thread is automatically destroyed at the end of this thread. The chart exists in the thread that contains the call to grCreate.

Default values of a chart created by programming

The default values of a chart are as follows:
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
The Chart functions Unit examples (WEBDEV): The Chart functions
[ + ] This example presents the main features of the chart designer of WEBDEV and it allows you to:
- Create a chart: Pie, Column or Line
- Define the display area of a chart
- Define the options of the chart (legend, percentage, ...)
The Chart functions Unit examples (WINDEV Mobile): The Chart functions
[ + ] Using the Chart functions:
- create a Pie, Column or Line chart by programming
- define the chart options (legend, percentage, ...)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230grf.dll
Windows Mobile wp230grf.dll
Linux wd230grf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment