Home | Sign in | English EN
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
WEBDEV - Server codeLinux Using the charts in WEBDEV Linux
To use the charts in WEBDEV Linux, the QT library (Core and GUI) version 5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore5
sudo apt-get install libqtgui5
The following functions are used to manage charts:
gr3DSParameterRetrieves or modifies a parameter for drawing a chart in 3D Spatial mode.
grAddDataAdds a data into a chart.
grAddTimeDataAdds data at a precise moment in a time chart.
grAutoRefreshCategoryLabelIdentifies or defines whether the category labels are refreshed whenever the chart is drawn.
grAutoRefreshSeriesIdentifies or defines whether a series is refreshed whenever the chart is drawn.
grAxisPositionIndicates the position where one of the chart axes (X or Y-coordinates) will be drawn.
grAxisTitleDefines the title of X-axis and the title of Y-axis in a chart.
grAxisTitleFontModifies the font used for the titles of the chart axes.
grAxisVisibleConfigures how the axes are displayed in Line or Column charts.
grBarColorInitializes the color of a specific bar in a Column or Stacked Column chart.
grCategoryColorInitializes the category color for a chart whose type is:
  • Pie,
  • Column,
  • Bubble chart,
  • Waterfall.
grCategoryLabelInitializes the label of a data category (or section) in a chart.
grClearPictErases the chart drawing (in an Image control or in a window).
grColorReturns and initializes the color of different chart elements.
grColumnAggregationDefines the algorithm for aggregating data in a grouped or stacked Column chart.
grColumnSpacingIndicates the spacing between each data category in a column chart or in a Minimum/Maximum stock chart.
grComparativeSeriesPositionFixes the position (left or right) of a series in a comparative Histogram chart.
grCreateCreates a specific type of chart.
grCreateFontgrCreateFont is kept for backward compatibility.
grDeleteAllErases a chart and destroys this chart.
grDeleteSeriesDeletes a data series from a chart.
grDestinationBMPDefines a BitMap file as destination of a chart (BMP means BitMap).
grDestinationControlDefines an Image control as destination of a chart.
grDestinationEMFDefines a meta file as chart destination (EMF means Enhanced Meta File).
grDestinationImageDefines an Image variable as destination of a chart.
grDestinationWMFDefines a meta file as chart destination.
grDestinationWndDefines a window as chart destination.
grDonutHolePercentageModifies the percentage corresponding to the radius of the hole in a Donut chart.
grDrawDraws a chart according to the specified parameters.
grExistChecks the existence of a chart in memory.
grGetDataRetrieves a data from a chart.
grGradientEnables or disables the display of color gradients in a chart.
grGraduateIndicates the step for the marks on the vertical/horizontal axis of a chart (which means the interval between two marks).
grGridlinesDisplays or hides the chart gridlines.
grHMAddDataAdds a data into a Heatmap chart.
grHMCaptionXModifies the caption of a category on the X-axis of a Heatmap chart.
grHMCaptionYModifies the caption of a category on the Y-axis of a Heatmap chart.
grHMColorSpecifies the colors of different values in a Heatmap chart.
grHMDeleteColorDeletes the colors specified by grHMColor from a Heatmap chart.
grHMGetDataRetrieves data from a Heatmap chart.
New in version 27
Modifies the percentage that corresponds the hole radius in the following charts:
  • Donut,
  • Radial Bar chart.
grImageSizeDefines the size of the image containing the chart.
grIncreaseDataAdds a value to a data in a chart.
grInfoXYReturns information about the series found at a specific chart point.
grLabelIndicates various parameters of additional legend in a chart.
grLabelFontModifies the font used for the category labels of a chart.
grLegendIndicates the presence and position of legend in a chart.
grLegendFontModifies the font used for the chart legend.
grLineThicknessRetrieves and/or modifies the value of the line thickness in a line chart.
grLoadParameterRestores the parameters used to draw a chart.
grMaskFormats the data displayed by grLabel or by grTooltip.
grMenuDefines the type of context menu displayed by a chart.
grMenuOptionModifies the text of an option in the context menu of a chart.
grOrientationModifies the orientation of chart axes.
grOriginModifies the start and end marks on one of the chart axes.
grOverlayChartUsed to display two different types of charts in the same chart.
grParameterRetrieves or modifies a chart parameter.
grPiePullOutPulls out a section (or all sections) in a chart.
grPieStartAngleIndicates the start angle of first section in a Pie chart, Semi-circular chart or Donut chart.
grPointColorInitializes the color of a specific point in one of the following chart types:
  • Line,
  • Scatter,
  • Bubble chart.
grPointInfoReturns the screen coordinates of a point or the screen coordinates of a value found in a chart.
grPointSizeConfigures the size of a specific point in a Line or Scatter chart.
grPointTypeModifies the shape of point for a specific category or value found in a Line, Area, Scatter and Radar chart.
grPrintPrints a chart.
grRaisedUsed to display a chart with raised effect.
New in version 27
Adds data to a Radial Bar chart.
New in version 27
Sets the maximum value in a Radial Bar chart.
New in version 27
Sets the rotation direction in a Radial Bar chart.
grRealTimeIntervalSets the time interval visible in a time chart with real-time display.
grRotationUsed to:
  • Turn a chart around one of its axes in order to better view the data.
  • Find out the rotation angle of a chart on one of its axes.
grSaveBMPSaves a chart that was previously drawn in a file in BMP format.
grSaveEMFSaves a chart that was drawn beforehand in a file in EMF format.
grSaveImageSaves the image of a chart in an Image variable.
grSaveParameterSaves the parameters of a chart in the format of a compressed string.
grSaveWMFSaves a chart that was drawn beforehand in WMF format.
grScatter3DAddDataAdds a new point to display in a 3D Scatter chart.
grScatter3DAltitudeColorDefines the different colors used according to the altitude levels of a series found in a 3D Scatter chart.
grScatter3DDeleteAltitudeColorDeletes the altitude colors specified by grScatter3DAltitudeColor.
grScatter3DDeleteMarkCaptionDeletes the captions of marks found in a 3D Scatter chart
grScatter3DGridlinesDisplays the gridlines for the different planes of a 3D Scatter chart.
grScatter3DLinkPointLinks (or not) the points found in a "3D Scatter" chart.
grScatter3DMarkCaptionUsed to specify the mark caption for a 3D Scatter chart.
grScatter3DProjectionIndicates whether the points found in a series of a 3D Scatter chart must be be projected on a given plane.
grScatterAddDataXYAdds a data into a "Scatter" chart.
grScatterGetDataXYRetrieves data from a "Scatter" chart.
grScatterLinkPointLinks (or not) the points found in a "Scatter" chart.
grScatterPointSizeDefines the size of points in a "Scatter" chart.
grScatterSeriesColorInitializes the color of a series in a "Scatter" chart.
grScatterSeriesLabelInitializes the label of data series in a "Scatter" chart.
grSeriesColorInitializes the color of a series or the color of a section.
grSeriesLabelInitializes the label of a data series in a chart.
grSeriesLineTypeModifies the type of line for a series found in a Line, Area, Scatter and Radar chart.
grSeriesOpacityModifies the opacity factor of a series in a chart.
grSeriesPointTypeModifies the type of point for a series found in a Line, Area, Scatter and Radar chart.
grSeriesSecondaryAxisDefines whether a series will be drawn on the secondary axis.
grSeriesTypeDefines the type of series used in a composite chart (chart containing several types of charts).
grSmoothingSmoothes a Line chart or a Scatter chart by using the "cubic splines" algorithm.
grSourceCategoryLabelDefines the source of the category labels.
grSourceSeriesDefines the source of a series.
New in version 27
Sets the starting angle of the first section in the following types of chart:
  • Pie, Semi-circular or Donut.
  • Sunburst.
  • Radial Bar chart.
grStockAddDataAdds data into a stock chart (candlestick, barcharts or minmax).
grStockGetDataRetrieves a data from a stock chart (candlestick, barcharts or minmax).
grSunburstAddDataAdds a data to a Sunburst chart.
grSunburstGetDataRetrieves a numeric value from a Sunburst chart.
grSunburstPullOutPulls out a section (or all the sections) in a Sunburst chart.
grSunburstRootSectionChanges or specifies the path of the root in a Sunburst chart.
grSunburstSectionColorChanges the color of a section in a Sunburst chart.
grSunburstStartAngleSpecifies the starting angle of the first section in a Sunburst chart.
grSurfaceAddDataAdds a data into a Surface chart.
grSurfaceAltitudeColorDefines the color used for the altitude (Z axis) of a surface chart.
grSurfaceDeleteAltitudeColorDeletes the altitude colors specified by grSurfaceAltitudeColor.
grSurfaceDeleteMarkCaptionDeletes the captions of marks found in a Surface chart.
grSurfaceGetDataRetrieves a data from a Surface chart.
grSurfaceGridlinesDisplays the gridlines for the different planes of a Surface chart.
grSurfaceMarksCaptionAllows you to specify the mark caption for a Surface chart.
grSurfaceMeshEnables or disables the mesh on a Surface chart.
grTimeLevelMaskDefines the display mask for a level of time scale in a chart.
grTimeLevelMaxDefines the number of levels to display in the time scale of a chart as well as the maximum level.
grTitleModifies the caption and/or position of the chart title.
grTitleFontModifies the font used for the chart title.
grTooltipDisplays and formats:
  • the tooltip associated with each section of a chart (section of a pie chart, column of a column chart, etc.). Also allows you to find out the characteristics of the tooltip associated with each chart section.
  • a custom tooltip, associated with a point.
grTypeIdentifies or modifies the type of chart.
grWaterfallCategoryTypeIndicates the category type of a Waterfall chart.
grWaterfallColorIndicates the color for a type of category in a Waterfall chart.
grWndSizeDefines the size of the window containing the chart.
grZoomDefines the zoom of a chart.
Related Examples:
The Chart control Unit examples (WINDEV): The Chart control
[ + ] Using the Chart control of WINDEV.
The chart control is used to directly edit the data that will be displayed in the chart.
This data can come from a table column, a list box, a WLanguage array. It can also be filled by programming.
WD Chart Training (WINDEV): WD Chart
[ + ] This example presents the different uses of the Chart control.
Different types of charts are presented:
- Pie
- Sunburst
- Line
- Scatter
- Column
- Area
- etc.

The main features presented here are the possibility to customize of charts from the code, as well as to fill the chart from an HFSQL data file, or in the editor.
WD Drawing on Chart Training (WINDEV): WD Drawing on Chart
[ + ] This example is based on an internal component used to draw elements on a chart control:
- Min/Max areas
- Various areas
- Flags
- Plots and trackers
The Chart control (click management) Unit examples (WINDEV): The Chart control (click management)
[ + ] Customizing the click on a Pie chart.
Here, the section clicked by the user is pulled out by the application.
To implement this behavior, all you have to do is use grInfoXY (to identify the section clicked) and grPiePullOut (to pull out the section).
WD Loan Complete examples (WINDEV): WD Loan
[ + ] The power of WINDEV and the ease-of-use of WLanguage have allowed us to develop this application within a single day!

This example is used to simulate loans and to:
- calculate the amount of the monthly repayments from the amount borrowed
- calculate the amount that can be borrowed from a given monthly repayment
- calculate the income of an investment from a monthly payment

For each case, you have the ability to view the amortization table corresponding to your parameters.
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, ...)
WM Click on Chart Cross-platform examples (WINDEV Mobile): WM Click on Chart
[ + ] The "WM Click on Chart" example proposes a solution for pulling out the sections of a Pie chart via a simple click.
This example includes a control template named "TPLC_PullOutChart". This control template is used to pull out the chart sections via a simple click.
To include this feature in another application, all you have to do is import the "TPLC_PullOutChart" template.
Minimum version required
  • Version 9
This page is also available for…
Windev Mobile - Tabela e Grafico
26 Oct. 2018
Video Grafico Webdev com Tabela
26 Oct. 2018
Video Grafito com Tabela
09 Jul. 2018
A more close to life example of creating a chart and modify its data
Add a Chart control to your Window/ Page,
Once the data is in the table the magic begins

grDeleteSeries(CHART_X) //Delete any data

FOR j=1 TO 12 //Description for every column below the chart
grCategoryLabel(CHART_X,j,SWITCH(j,"Jan", "Feb", "Mar", "Apr", "May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"))

//Descriptions of the columns, this shows up to the right of the chart

//The info is in a 3 column memory table: Months, Col_Sunny, Col_Rainy
//Add the value to the first column of the chart
grAddData(CHART_X,1, TABLE_X.COL_Sunny)
//Add the value to the second column of the chart
grAddData(CHART_X,2, TABLE_X.COL_Rainy)


//Change the Title of the chart
CHART_X..Title = "New title Year [" + NumToString(theyear) +"]"

grRaised(CHART_X, EDT_3d) //Add an extra 3d Effect
grDraw(CHART_X) //Actually draw the chart
Diego Sanchez
31 Jul. 2017