PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Functions for managing charts
Versions 15 and later
WEBDEV - Server codeLinux Using the charts in WEBDEV Linux
To use the charts in WEBDEV Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
New in version 15
WEBDEV - Server codeLinux Using the charts in WEBDEV Linux
To use the charts in WEBDEV Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
WEBDEV - Server codeLinux Using the charts in WEBDEV Linux
To use the charts in WEBDEV Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
Versions 17 and later
iPhone/iPad These functions are now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad These functions are now available for the iPhone/iPad applications.
iPhone/iPad These functions are now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App These functions are now available for the applications in Windows Store apps mode.
New in version 18
Universal Windows 10 App These functions are now available for the applications in Windows Store apps mode.
Universal Windows 10 App These functions are now available for the applications in Windows Store apps mode.
Versions 19 and later
Android These functions are now available for the Android applications.
New in version 19
Android These functions are now available for the Android applications.
Android These functions are now available for the Android applications.
Versions 21 and later
Universal Windows 10 App These functions are now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App These functions are now available in Universal Windows 10 App mode.
Universal Windows 10 App These functions are now available in Universal Windows 10 App mode.
The following functions are used to manage the charts:
Versions 23 and later
grScatter3DDeleteAltitudeColor
grScatter3DDeleteAltitudeColor
Deletes the altitude colors specified by grScatter3DAltitudeColor.
gr3DSParameterRetrieves or modifies a parameter for drawing a chart in 3D Spatial mode.
grAddDataAdds a data into a 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.
grAxisVisibleEnables or disables the display of axes in a Line or Column chart.
Versions 23 and later
grBarColor
New in version 23
grBarColor
grBarColor
Initializes 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 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.
Versions 23 and later
grColumnAggregation
New in version 23
grColumnAggregation
grColumnAggregation
Defines 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.
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 a data from a Heatmap chart.
grImageSizeDefines the size of the image containing the chart.
grIncreaseDataAdds a value to a data in a chart.
grInfoPointReturns the screen coordinates of a point or the screen coordinates of a value found 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 popup menu displayed by a chart.
grMenuOptionModifies the text of an option in the popup 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.
Versions 23 and later
grPointColor
New in version 23
grPointColor
grPointColor
Initializes the color of a specific point in one of the following chart types:
  • Line,
  • Scatter,
  • Bubble chart.
Versions 23 and later
grPointSize
New in version 23
grPointSize
grPointSize
Configures 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.
grRotationTurns a Surface chart around one of its axes in order to better view the data.
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.
grSaveParameterSaves the parameters of a chart in the format of a compressed string.
grSaveWMFSaves a chart that was drawn beforehand in WMF format.
Versions 23 and later
grScatter3DAddData
New in version 23
grScatter3DAddData
grScatter3DAddData
Adds a new point to display in a 3D Scatter chart.
Versions 23 and later
grScatter3DAltitudeColor
New in version 23
grScatter3DAltitudeColor
grScatter3DAltitudeColor
Defines the different colors used according to the altitude levels of a series found in a 3D Scatter chart.
Versions 23 and later
grScatter3DDeleteMarkCaption
grScatter3DDeleteMarkCaption
Deletes the captions of marks found in a 3D Scatter chart
Versions 23 and later
grScatter3DGridlines
New in version 23
grScatter3DGridlines
grScatter3DGridlines
Displays the gridlines for the different planes of a 3D Scatter chart.
Versions 23 and later
grScatter3DLinkPoint
New in version 23
grScatter3DLinkPoint
grScatter3DLinkPoint
Links (or not) the points found in a "3D Scatter" chart.
Versions 23 and later
grScatter3DMarkCaption
New in version 23
grScatter3DMarkCaption
grScatter3DMarkCaption
Used to specify the mark caption for a 3D Scatter chart.
Versions 23 and later
grScatter3DProjection
New in version 23
grScatter3DProjection
grScatter3DProjection
Indicates 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 a data from a "Scatter" chart.
grScatterLinkPointLinks (or not) the points found in a "Scatter" chart.
grScatterPointSizeDefines the size of the points found 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 a 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.
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 start 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.
Versions 23 and later
grTimeLevelMask
New in version 23
grTimeLevelMask
grTimeLevelMask
Defines the display mask for a level of time scale in a chart.
Versions 23 and later
grTimeLevelMax
New in version 23
grTimeLevelMax
grTimeLevelMax
Defines the number of levels to display in the time scale of a chart as well as the maximum level.
grTitleModifies the caption and/or the position of chart title.
grTitleFontModifies the font used for the chart title.
grTooltipDisplays and formats:
  • the tooltip associated with each chart section (section for a pie chart, bar for a column chart, ...). 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 Age Pyramid Training (WINDEV): WD Age Pyramid
[ + ] The "WD Age Pyramid" example explains how to create an "Age Pyramid" chart from two histograms.

It proposes an "Age Pyramid" control template that overloads the main "gr" functions of WLanguage.

This control template can be easily reused in your own projects,
while adapting it (adding functions, modifying functions, …) according to your own requirements.
The example also presents two uses of the control template, two age pyramids, with different settings.
WD Chart Training (WINDEV): WD Chart
[ + ] This educational example present different uses of the chart control.
The following charts are presented:
- Semi-circular
- Donut
- Pie
- Sunburst
- Line
- Scatter
- 3D Scatter
- Column
- Area
- Bubble
- Radar
- Funnel
- Surface
- Waterfall
- Composite

The main features presented in this example are the ability to customize the charts by programming as well as the method used to fill a chart from a HFSQL 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, ...)
Pocket Click on Chart Mobile (WINDEV Mobile): Pocket Click on Chart
[ + ] The "Pocket Click on Chart" example proposes a solution for pulling out the sections of a pie chart via a simple user click.

This example includes a control template named "TPLC_PullOutChart". This control template is used to enable the pulling out of a chart section via a simple click.

To make this feature available in another application, all you have to do is import the control template named "TPLC_PullOutChart".
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.
See also
Minimum required version
  • Version 9
This page is also available for…
Comments
Windev Mobile - Tabela e Grafico
https://youtu.be/h7ellv_iZoo
amarildo
Oct. 26 2018
Video Grafico Webdev com Tabela
https://youtu.be/rnnj2--Bgtw
amarildo
Oct. 26 2018
Video Grafito com Tabela
https://youtu.be/7Pvbgqvp4ws
amarildo
Jul. 09 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"))
END

//Descriptions of the columns, this shows up to the right of the chart
grSeriesLabel(CHART_X,1,"Sunny")
grSeriesLabel(CHART_X,2,"Rainy")

//The info is in a 3 column memory table: Months, Col_Sunny, Col_Rainy
FOR EACH ROW OF TABLE_X
//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)

END

//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
Jul. 31 2017