AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de gráficos
  • Adding data
  • Adding data into the different types of charts
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds a data into a chart.
Please note For "advanced" graph types, there is a specific WLanguage function for adding data (see paragraph "Remarks").
WEBDEV - Código ServidorLinux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Ejemplo
// Add a data into the "CHART_MyChart" control. 
// This data (whose value is 10) is added at the end of the first series.
grAddData(CHART_MyChart, 1, 10)
// 9-value curve: if the "Draw missing values" option is set to "Not drawn", 
// only point 3 is not drawn, points 8 and 9 are drawn (at zero)
grAddData(CHART_MyChart, 1, 1, 50)
grAddData(CHART_MyChart, 1, 2, 30)
grAddData(CHART_MyChart, 1, 3, 30) // Not drawn
grAddData(CHART_MyChart, 1, 4, 30)
grAddData(CHART_MyChart, 1, 5, 60)
grAddData(CHART_MyChart, 1, 6, 60)
grAddData(CHART_MyChart, 1, 7, 0) // Always drawn,
grAddData(CHART_MyChart, 1, 8, Null) // Always drawn,
grAddData(CHART_MyChart, 1, 9, 60) 

grDraw(CHART_MyChart)
Sintaxis
grAddData(<Chart name> , <Series number> [, <Index>] , <Value>)
<Chart name>: Control name or character string
Name of the chart to be used. This name corresponds to:
  • the name of the chart defined programmatically with grCreate. This name must be in quotation marks.
  • the name of the Chart control (in the window, page or report editor). This name must not be in quotation marks.
Android Only Chart controls are available.
PHP Only interactive Chart controls are available.
<Series number>: Integer
Number of the series into which a value will be added.
For example, if the Chart control displays 2 lines, this is used to identify the line for which the data must be added.
If the specified number does not exist, the series between the last existing series and the specified number are automatically created and initialized to 0.
<Index>: Optional integer
Index of the data in the series into which a value must be added.
For example, for a Line chart, this parameter corresponds to the X-axis of the value to add.
If this parameter:
  • is not specified, the value is added at the end of the series.
  • is specified, the former value is replaced.
Android The index of the data in the series must be a strictly positive integer.
<Value>: Integer or real
Value to add.
For example, for a Line chart, this parameter corresponds to the Y-axis of the value to add.
Observaciones

Adding data

  • The data added by grAddData will be taken into account during the next call to grDraw.
  • For a pie chart (grPie constant), only the data found in the first series is used. A Pie chart cannot be drawn if the data found in the first series is null.
  • For the "Stacked bar" charts, if the value of the first series is negative, the corresponding bar is oriented toward the bottom.

Adding data into the different types of charts

Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300grf.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local