ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Overview
  • How to program charts?
  • Creating charts through programming
  • Charts and threads
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
Overview
WINDEV, WEBDEV and WINDEV Mobile include a Chart control (that can be used in the window editor, page editor and report editor) as well as several functions used to create and handle charts.
How to program charts?

Creating charts through programming

WINDEV, WEBDEV and WINDEV Mobile include several functions for handling charts. These functions allow you to create the charts, to modify them, to change the display options...
The following operations are used to create the charts:
  1. Create the chart with grCreate.
  2. Initialize the chart data with the following functions:
  3. Choose the display destination of the chart with the following functions:
  4. Draw the chart with grDraw.
Several functions are used to configure and modify the appearance of the chart. You have the ability to display a legend, the title of axes, ... For more details, see the list of functions for chart management.

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.
Related Examples:
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 Reports Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report:

- prints based on different data sources (queries, variables, ...)
- prints based on controls (Table, Spreadsheet, PVT, ...)
- printing composite reports
- specific prints (portrait/landscape, report with watermark, report with bar code, ...)
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 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.
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, ...)
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.
The Chart control Unit examples (WINDEV Mobile): The Chart control
[ + ] Using the Chart control to display different types of charts:
- Pie (or pie chart)
- Line
- Column chart
- Area
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, ...)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help