THPDFPage.DrawChart
在调用方提供的矩形内,将折线图、柱状图、面积图、饼图或散点图数据渲染为原生 PDF 矢量图形和文本
声明
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;
参数
| 名称 | 说明 |
|---|---|
Chart | 由调用方持有、待验证和渲染的图表模型 |
X, Y | 图表在页面坐标系中的左上角位置 |
Width, Height | 图表矩形,至少为 120 × 100 点 |
Options | 系列、数据点、标签、无障碍、标题、坐标轴和网格的限制或开关 |
Statistics | Receives rendered object counts, path work, tagging state, and label truncation |
StructureParent | 可选的当前页结构父节点,用于创建带替代文本的带标签 Figure |
返回值
此过程不返回值;扩展重载通过 Statistics 报告结果
使用说明
- The simple overload uses
THPDFChartRenderOptions.Default - 渲染器会在保存图形状态或输出绘制操作符之前,先验证完整的模型
- 直角坐标系的系列可以组合使用,但饼图必须恰好包含一个饼图系列
- 负值和零值的饼图数据会被省略,且至少需要一个正值
- Visible labels stop at
MaxLabelswithout dropping paths or points - Generated accessibility text has independent point and byte budgets
- 非 nil 的
StructureParent要求此页必须是文档的当前页 - 图表对象由调用方持有,而图表持有其系列和数据点的存储