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
  • How to retrieve the components of the color?
  • Colors of chart elements (legends, ...)
  • Colors in the charts (series, section, ...)
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
Returns and initializes the color of different chart elements.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Ejemplo
// Modify the colors in a Chart control
grColor(CHART_Chart1, grColorLegend, LightRed)
grDraw(CHART_Chart1) // Border of the legend drawn in red
grColor(CHART_Chart1, grColorLegend, LightBlue) // The border is still red
grDraw(CHART_Chart1) // Border of the legend drawn in blue
Sintaxis

Finding out the color of a chart element Ocultar los detalles

<Result> = grColor(<Chart name> , <Element>)
<Result>: Integer
Color of the specified element in RGB format.
Warning The value returned may differ depending on the display configuration (resolution, etc.).
<Chart name>: Control name or character string
Name of the chart to be used. This name can correspond to:
  • the name of the chart defined programmatically with grCreate.
  • the name of the Chart control in the window, page or report editor.
Android Only Chart controls are available.
PHP Only interactive Chart controls are available.
<Element>: Integer constant
Chart element whose color you want to get. This element can correspond to one of the following constants:
grColorAxisColor of axes.
grColorAxisSideColor of raised part of axes.
AndroidPHP This constant is not available.
grColorBorderColor of border for the chart elements (for the charts other than 3D charts). Used to find out the border color for a bar in a column chart for example.
grColorBullishCandlestickColor of bars in a candlestick when the closing value is greater than the opening value.
Android This constant is not available.
grColorGridlinesGridline color.
grColorGridlinesSideColor of raised part of gridlines.
AndroidPHP This constant is not available.
grColorLegendColor of legend border.
grColorLegendBackgroundLegend background color.

Modifying the color of a chart element Ocultar los detalles

grColor(<Chart name> , <Element> [, <New color>])
<Chart name>: Control name or character string
Name of the chart to be used. This name can correspond to:
  • the name of the chart defined programmatically with grCreate.
  • the name of the Chart control in the window, page or report editor.
Android Only Chart controls are available.
<Element>: Integer constant
Chart element whose color must be modified. This element can correspond to one of the following constants:
grColorAxisColor of axes.
grColorAxisSideColor of raised part of axes.
AndroidPHP This constant is not available.
grColorBorderColor of border for the chart elements (for the charts other than 3D charts). Used to find out the border color for a bar in a column chart for example.
grColorBullishCandlestickColor of bars in a candlestick when the closing value is greater than the opening value.
Android This constant is not available.
grColorGridlinesGridline color.
grColorGridlinesSideColor of raised part of gridlines.
AndroidPHP This constant is not available.
grColorLegendColor of legend border.
grColorLegendBackgroundLegend background color.
<New color>: Integer or constant (optional)
Color of the specified element. This color can correspond to:
Observaciones

How to retrieve the components of the color?

To retrieve the components of the color returned by grColor:
  • To get the red component, use RGBRed (or perform a division modulo 256 of <Result>),
  • To get the green component, use RGBGreen (or perform a division modulo 256 of <Result>/256),
  • To get the blue component, use RGBBlue (or perform a division modulo 256 of <Result>/256/256).

Colors of chart elements (legends, ...)

  • The settings defined with grColor will be taken into account the next time grDraw is called or the next time the chart is drawn (host control is resized, context menu is modified, etc.).
  • The transparent color can only be used for the background color of the legend (grColorLegendBackground constant).
  • Print graph If white color is associated with axes (constant grColorAxis), gridlines (constant grGridColor), the legend (constant grLegendColor) and border (constant grColorBorder), then the drawing will be printed in black.

Colors in the charts (series, section, ...)

  • The color of Bearish candlesticks is defined by the color of the series.
  • grSeriesColor is used to modify the color of a series.
  • grCategoryColor is used to modify the color of categories for the Pie and Color charts.
  • grScatterSeriesColor is used to initialize the color of a series in a "Scatter" chart.
  • grSunburstSectionColor is used to change the color of a section in a Sunburst chart.
  • grSurfaceAltitudeColor is used to define the color used for the altitude (Z axis) in a Surface chart.
  • grWaterfallColor indicates the color for a type of category in a Waterfall chart.
  • grHMColor is used to define the color of values in a Heatmap chart.
Componente: wd300grf.dll
Versión mínima requerida
  • Versión 12
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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