Expand description
Chart export: the chart is drawn once as SVG, in the bundled font (IBM Plex Sans,
under the SIL Open Font License, in assets/fonts), then written as SVG with
its text as outlines, rasterized to PNG, or written as PDF from the same
outlines (chart_pdf). The same figure comes out the same on every machine;
text the bundled font lacks falls back to a system font.
Structs§
- Chart
Export Request - What a chart export asks for: where, in what format, how.
- Export
Options - How an export is made: its size, colors, legend and words.
- Figure
- A chart ready to draw: what it plots, and what it says about its rows (a sample, values a range left out).
- Palette
- The colors a figure is drawn in.
- Rgb
- An sRGB color.
Enums§
- Chart
Export Format - Export format for a chart.
- Export
Style - The colors an export is drawn in.
- Legend
Place - Where the series are named.
- Line
Width - A line chart’s stroke.
- Point
Opacity - How opaque a scatter’s points are.
- Point
Size - A scatter point’s radius.
- Size
Preset - A size an export is made at: pixels, and the resolution that makes them a physical size (a PDF’s page, an SVG’s inches, the text’s points).
Constants§
- RECIPE_
KEY - The key a recipe is kept under: a PNG chunk’s keyword, the SVG element’s name, the PDF’s info entry.
- SERIES
- Series colors a palette has: as many as the theme’s chart slots.
Functions§
- auto_
opacity - Opaque up to 1,000 points, 0.15 from 100,000, and between them along the log of the count: each tenfold more points is drawn as much fainter.
- recipe_
in - The recipe an exported chart carries, if it carries one.
- render
- The figure in
format, as the bytes of the file. - svg
- The SVG for
figure, before its text is set.