THPDFPage.DrawChart
Renders line, bar, area, pie, or scatter data as native PDF vectors and text inside a caller-supplied rectangle
Declaration
procedure DrawChart(Chart: THPDFChart;
X, Y, Width, Height: Single); overload;
procedure DrawChart(Chart: THPDFChart;
X, Y, Width, Height: Single;
const Options: THPDFChartRenderOptions;
out Statistics: THPDFChartRenderStatistics); overload;
procedure DrawChart(Chart: THPDFChart;
X, Y, Width, Height: Single;
const Options: THPDFChartRenderOptions;
out Statistics: THPDFChartRenderStatistics;
StructureParent: THPDFDictionaryObject); overload;
Parameters
| Name | Description |
|---|---|
Chart | Owned-by-caller chart model to validate and render |
X, Y | Top-left chart position in the page coordinate system |
Width, Height | Chart rectangle, which must be at least 120 by 100 points |
Options | Series, point, label, accessibility, title, axis, and grid limits or switches |
Statistics | Receives rendered object counts, path work, tagging state, and label truncation |
StructureParent | Optional current-page structure parent used to create a tagged Figure with alternate text |
Return value
This procedure does not return a value; the extended overloads report their result through Statistics
Usage notes
- The simple overload uses
THPDFChartRenderOptions.Default - The renderer validates the complete model before it saves graphics state or emits drawing operators
- Cartesian series may be combined, but a pie chart must contain exactly one pie series
- Negative and zero pie values are omitted and at least one positive value is required
- Visible labels stop at
MaxLabelswithout dropping paths or points - Generated accessibility text has independent point and byte budgets
- A non-nil
StructureParentrequires this page to be the document current page - The caller owns the chart object and the chart owns its series and point storage