Expand description
§Chart Rendering
Engine-native chart generation. Each chart type produces a flat list of
ChartPrimitive drawing commands. The PDF renderer iterates the list to
emit vector graphics directly — no SVG intermediary.
Modules§
- area
- Area chart builder — like line chart but with filled regions under each series.
- bar
- Bar chart builder.
- dot
- Dot plot (scatter plot) builder.
- line
- Line chart builder.
- pie
- Pie/donut chart builder.
Enums§
- Chart
Primitive - A drawing primitive emitted by chart builders.
- Text
Anchor - Text horizontal alignment for labels.
Constants§
- AXIS_
COLOR - AXIS_
LABEL_ FONT - DEFAULT_
COLORS - Default color palette for chart series/slices.
- GRID_
COLOR - LABEL_
COLOR - LABEL_
MARGIN - TITLE_
FONT - TITLE_
HEIGHT - X_
AXIS_ HEIGHT - Y_
AXIS_ WIDTH
Functions§
- format_
number - Format a number compactly (1000 → “1K”, 1000000 → “1M”).
- lighten_
color - Lighten a hex color toward white by the given factor (0.0=unchanged, 1.0=white).
- measure_
label - Measure the width of a label string in Helvetica at the given font size.
- nice_
number - Round a range maximum to a “nice” number for axis ticks.
- parse_
hex_ color - Parse a hex color string (#RGB or #RRGGBB) to a Color.
- resolve_
color - Get a color from the default palette by index, or parse a custom color string.