ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Changing the type of chart
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
Identifies or modifies the type of chart.
Example
// Modification du type du graphe "MonGraphe"
grType("MonGraphe", grPie)
Syntax

Finding out the type of chart Hide the details

<Result> = grType(<Chart name>)
<Result>: Constant
Indicates the type of chart:
gr3DSAreaStacked3D chart of stacked areas.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSAreaDepth3D chart of areas shown one behind the other.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSLine3D line chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColStacked3D stacked bar chart.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColClustered3D clustered column chart.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnStacked3D stacked bar chart.
The bars are represented by 3D rectangles. This type of chart does not support negative values.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnClustered3D clustered column chart.
The bars are represented by 3D rectangles.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by 3D rectangles.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSMinMax3D Stock chart displaying the difference between the minimum and maximum stock values
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSScatter3D Scatter chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSPie3D Pie chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
grAreaArea chart (see example of Area chart).
grPolarAreaPolar Area chart (see example of Polar Area chart).
grBarChartsStock chart (see example of Stock chart).
grCandlestickCandlestick stock chart (see example of Stock chart).
grRadialBarRadial Bar chart (see example of Radial Bar chart).
grLineLine chart (see example of Line chart)
grDonutDonut chart. See example of Donut chart.
grFunnelFunnel chart.
grBubbleChartBubble chart (see example of Bubble chart).
grHeatMapHeatmap chart (see example of Heatmap chart).
grSemiCircularSemi-circular chart (see example of Semi-circular chart).
grColumnColumn chart (see example of Column chart)
grComparativeHistogramComparative Histogram chart.
grColumnStackedStacked Column chart. This type of chart does not support 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).
grScatter3D3D Scatter chart (see example of 3D Scatter chart).
grPyramidPyramid chart (see example of Pyramid chart).
grRadarRadar chart (see example of Radar chart).
grPiePie chart (see example of Pie chart).
grSunburstSunburst chart. See example of Sunburst chart.
grSurfaceSurface chart (see example of Surface chart).
grWaterfallWaterfall chart (see example of Waterfall chart).
New in version 2024
grWaffleChart
Waffle graph (see example of a Waffle graph).
grRangeAreaRange Area chart (see example of Range Area chart).
<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.

Modifying the type of chart Hide the details

grType(<Chart name> , <Type of chart>)
<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.
<Type of chart>: Constant
Specifies the new type of chart:
gr3DSAreaStacked3D chart of stacked areas.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSAreaDepth3D chart of areas shown one behind the other.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSLine3D line chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColStacked3D stacked bar chart.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColClustered3D clustered column chart.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSCylinderColDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by cylinders.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnStacked3D stacked bar chart.
The bars are represented by 3D rectangles. This type of chart does not support negative values.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnClustered3D clustered column chart.
The bars are represented by 3D rectangles.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSColumnDepth3D column chart in depth: the series are represented in perspective.
The bars are represented by 3D rectangles.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSMinMax3D Stock chart displaying the difference between the minimum and maximum stock values.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSScatter3D Scatter chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
gr3DSPie3D Pie chart.
Windows This constant is only available in WINDEV applications for Windows and Linux.
grAreaArea chart (see example of Area chart).
grPolarAreaPolar Area chart (see example of Polar Area chart).
grBarChartsStock chart (see example of Stock chart).
grCandlestickCandlestick stock chart (see example of Stock chart).
grRadialBarRadial Bar chart. See example of Radial Bar chart.
grLineLine chart (see example of Line chart).
grDonutDonut chart. See example of Donut chart.
grFunnelFunnel chart.
grBubbleChartBubble chart (see example of Bubble chart).
grHeatMapHeatmap chart.
grSemiCircularSemi-circular chart (see example of Semi-circular chart).
grColumnColumn chart (see example of Column chart).
grComparativeHistogramComparative Histogram chart.
grColumnStackedStacked Column chart. This type of chart does not support 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).
grScatter3D3D Scatter chart (see example of 3D Scatter chart).
grPyramidPyramid chart (see example of Pyramid chart).
grRadarRadar chart (see example of Radar chart).
grPiePie chart (see example of Pie chart).
grSunburstSunburst chart. See example of Sunburst chart.
grSurfaceSurface chart (see example of Surface chart).
New in version 2024
grWaffleChart
Waffle graph (see example of a Waffle graph).
grWaterfallWaterfall chart (see example of Waterfall chart).
grRangeAreaRange Area chart (see example of Range Area chart).

grType has no action on the chart if this parameter corresponds to the current type of chart.
Remarks

Changing the type of chart

  • When changing the type of chart, the parameters of the former chart that cannot be reproduced in the new chart are reinitialized.
  • Changing the type of chart may produce unexpected effects. For example, when a Pie chart (grPie constant) is changed into a Scatter chart (grScatter constant), all the points are aligned on the X-axis (horizontal axis).
  • The type of chart can be changed in the context menu. However, the display options produce different visual effects for each type of chart.
  • The parameters defined by grType will be taken into account during the next call to grDraw.
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
Business / UI classification: Neutral code
Component: wd290grf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo grType
// Exemplo grType

//Seleciona Combox Grafico

grType(CHART_tecnico,COMBO_grafico)
grDraw(CHART_tecnico)

//Preenhce Combox
ListDeleteAll(COMBO_grafico) // Limpar Combox
ListAdd(COMBO_grafico,"gr3DSAreaStacked")
ListAdd(COMBO_grafico,"gr3DSAreaDepth")
ListAdd(COMBO_grafico,"gr3DSLine")
ListAdd(COMBO_grafico,"gr3DSCylinderColStacked")
ListAdd(COMBO_grafico,"gr3DSCylinderColClustered")
ListAdd(COMBO_grafico,"gr3DSCylinderColDepth")
ListAdd(COMBO_grafico,"gr3DSColumnStacked")
ListAdd(COMBO_grafico,"gr3DSColumnClustered")
ListAdd(COMBO_grafico,"gr3DSColumnDepth")
ListAdd(COMBO_grafico,"gr3DSMinMax")
ListAdd(COMBO_grafico,"gr3DSScatter")
ListAdd(COMBO_grafico,"gr3DSPie")
ListAdd(COMBO_grafico,"grArea")
ListAdd(COMBO_grafico,"grBarCharts")
ListAdd(COMBO_grafico,"grCandleStick")
ListAdd(COMBO_grafico,"grCurve")
ListAdd(COMBO_grafico,"grDonut")
ListAdd(COMBO_grafico,"grFunnel")
ListAdd(COMBO_grafico,"grBubbleChart")
ListAdd(COMBO_grafico,"grHeatMap")
ListAdd(COMBO_grafico,"grSemiCircular")
ListAdd(COMBO_grafico,"grColumn")
ListAdd(COMBO_grafico,"grColumnStacked")
ListAdd(COMBO_grafico,"grMinMax")
ListAdd(COMBO_grafico,"grScatter")
ListAdd(COMBO_grafico,"grRadar")
ListAdd(COMBO_grafico,"grPie")
ListAdd(COMBO_grafico,"grSunburst")
ListAdd(COMBO_grafico,"grSurface")
ListAdd(COMBO_grafico,"grWaterfall")

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-986-grafico-005-alterar-tipo.html

https://www.youtube.com/watch?v=t6irf3taKbo
De matos
04 Dec. 2016
Exemplo Alterar Grafico Manualmente
//Varios tipos de gráfico
//Trocado via programação
grType(CHART_Tecnico,gr3DSAreaStacked)
grDraw(CHART_Tecnico)

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/06/windev-grafico-3-alterar-tipo-de.html
https://www.youtube.com/watch?v=Ek7pvVhvBfM
De matos AMARILDO
06 Jun. 2016

Last update: 11/22/2023

Send a report | Local help