Home | Sign in | English UK

  • Adding data into a Scatter chart
  • Adding data into a chart
  • Equivalence
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Adds a data into a "Scatter" chart.
Reminder: By default, a chart contains no data.
// Adds a data into the CHART_MyChart control ("Scatter" chart).
// This value (20, 10) is added at the end of the first series.
CHART_MyChart.ScatterAddDataXY(1, 20, 10)
<Chart control>.ScatterAddDataXY(<Series number> [, <Subscript>] , <X value> , <Y value>)
<Chart control>: Control name
Name of the Chart control to use (found in the window editor, page editor or report editor).
<Series number>: Integer
Number of the series in which a point must be initialized. If the specified series does not exist, the chart designer creates as many series as necessary in order to get a consistent matrix. All the created series are initialized to 0.
<Subscript>: Optional integer
Subscript of the data to initialize in the series. If this parameter is not specified, the value is added at the end of the series.
<X value>: Real
Horizontal coordinate (X coordinate) of the point to add.
<Y value>: Real
Vertical coordinate (Y coordinate) of the point to add.

Adding data into a Scatter chart

The data defined by <Chart>.ScatterAddDataXY will be taken into account during the next call to <Chart>.Draw.

Adding data into a chart

<Chart>.AddData is used to add data into a chart (pie, column, ...)
Depending on the type of chart, specific functions can also be used to add data:
Reminder: To add a value to a chart data, use <Chart>.IncreaseData.


We recommend that you use <Chart>.ScatterAddDataXY to add data into the "Scatter" charts. However, you also have the ability to use <Chart>.AddData.
The following syntax:
CHART_MyChart.ScatterAddDataXY(I, 1, 10, 20)
est is equivalent to the syntax:
CHART_MyChart.AddData(i*2-1, 1, 10)
CHART_MyChart.AddData(i*2, 1, 20)
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This example shows the 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
- Comparative

The main features presented in this example are the customization of charts by programming, as well as the method used to fill a chart from an HFSQL file or in the editor.
Component : wd250grf.dll
Minimum version required
  • Version 23
This page is also available for…
Click [Add] to post a comment