|
|
|
|
|
- Creating and drawing a chart through programming
- Drawing several charts at the same time
- Charts and threads
- Default values of a chart created through programming
grCreate (Function) In french: grCrée Creates a specific type of chart. Remarks: - It is recommended to 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 through programming. This function cannot be used in the window editor, page editor or report editor.
// Create a column chart // (and save the parameters modified by the user) grCreate("MyChart", grColumn)
Syntax
grCreate(<Chart name> , <Chart type> [, <Persistence>])
<Chart name>: Character string 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. <Chart type>: Constant Specifies the type of chart to create: | | gr3DSAreaStacked | 3D chart of stacked areas. | gr3DSAreaDepth | 3D chart of areas shown one behind the other. | gr3DSLine | 3D line chart. | gr3DSCylinderColStacked | 3D stacked bar chart. The bars are represented by cylinders. | gr3DSCylinderColClustered | 3D clustered column chart The bars are represented by cylinders. | gr3DSCylinderColDepth | 3D column chart in depth: the series are represented in perspective. The bars are represented by cylinders. | gr3DSColumnStacked | 3D stacked bar chart. The bars are represented by 3D rectangles. This type of chart does not support negative values. | gr3DSColumnClustered | 3D clustered column chart. The bars are represented by 3D rectangles. | gr3DSColumnDepth | 3D column chart in depth: the series are represented in perspective. The bars are represented by 3D rectangles. | gr3DSMinMax | 3D Stock chart displaying the difference between the minimum stock value and the maximum stock value | gr3DSScatter | 3D Scatter chart. | gr3DSPie | 3D Pie chart. | grArea | Area chart (see example of Area chart). | grBarCharts | Stock chart (see example of Stock chart). | grCandlestick | Candlestick stock chart (see example of Stock chart). | New in version 27grRadialBar | Radial Bar chart. | grLine | Line chart (see example of Line chart). | grDonut | Donut chart. See example of Donut chart. | grFunnel | Funnel chart. See example of Funnel chart. | grBubbleChart | Bubble chart (see example of bubble chart). | grHeatMap | Heatmap chart (see example of Heatmap chart). | grSemiCircular | Semi-circular chart (see example of Semi-circular chart). | grColumn | Column chart (see example of Column chart). | grColumnStacked | Stacked Column chart. This type of chart does not support negative values. | grMinMax | Stock chart displaying the difference between the minimum stock value and the maximum stock value (see example of Stock chart) | grScatter | Scatter chart (see example of Scatter chart). | grScatter3D | 3D Scatter chart (see example of 3D Scatter chart). | grPyramid | Pyramid chart (see example of Pyramid chart). | grRadar | Radar chart (see example of Radar chart). | grPie | Pie chart (see example of Pie chart). | grSunburst | Sunburst chart. See example of Sunburst chart. | grSurface | Surface chart (see example of Surface chart). | grWaterfall | Waterfall chart (see example of Waterfall chart). | grRangeArea | Range Area chart (see example of Range Area 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 through 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 through programming The default values of a chart are as follows:
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
|
|
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, ...)
|
|
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, ...)
|
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|