User Tools

Site Tools


api:dk11:delphi:gischart.gisdrawchart_tgis_rendererabstract_tpoint_integer_tgis_chartstyle_tgis_doublearray_tgis_colorarray

Table of Contents



GisDrawChart(TGIS_RendererAbstract; TPoint; Integer; TGIS_ChartStyle; TGIS_DoubleArray; TGIS_ColorArray) method

DK for Delphi | GisChart.GisDrawChart | Overloads | Methods

Renders a bar or pie chart at the specified canvas location using explicit colors for individual chart segments.

Syntax

// Delphi
procedure GisDrawChart(
  const _canvas : TGIS_RendererAbstract;
  const _center : TPoint;
  const _size : Integer;
  const _style : TGIS_ChartStyle;
  const _values : TGIS_DoubleArray;
  const _colors : TGIS_ColorArray
); overload;
// C++ Builder
extern DELPHI_PACKAGE void GisDrawChart(
  TGIS_RendererAbstract* const _canvas,
  TPoint* const _center,
  const int _size,
  TGIS_ChartStyle* const _style,
  TGIS_DoubleArray* const _values,
  TGIS_ColorArray* const _colors
) /* overload */;

Parameters

Name Type Description
_canvas TGIS_RendererAbstract Target renderer used for drawing the chart.
_center TPoint Center point of the chart in canvas pixel coordinates.
_size Integer Chart size in pixels; values less than or equal to 0 produce no rendering.
_style TGIS_ChartStyle Chart style that defines chart type and non-color visual settings.
_values TGIS_DoubleArray Numeric values to visualize as chart segments.
_colors TGIS_ColorArray Explicit colors applied to chart segments in the same order as _values.

Remarks

PURPOSE: Draw a compact thematic chart when segment colors must be provided explicitly by the caller.

BEHAVIOR: Uses _style to select bar or pie rendering, but takes segment colors from _colors instead of the style palette. Values are normalized to the chart size and drawn as bars or pie slices centered at _center.

USAGE: Call this overload when each value already has an assigned thematic color.

GisDrawChart(renderer, centerPoint, 40, chartStyle, values, colors)

CONSTRAINTS: _canvas must be valid. _size should be positive. Empty value arrays produce no rendering. _values and _colors must have the same length; caller validation is required. No legend rendering is provided.

2026/07/11 00:20

Page Tools