Repository navigation
FerroChart 0.4.0
Image markers, badges and text in any script.
Added
- Image markers. Markers take a
size(4–64 CSS px), anicon(an image
registered with the chart, clipped to a circle or square), alabel(up to
8 characters inside the shape, such asDB) and aborderring.
Chart::add_icon/remove_icon; JavaScriptregisterIcon(name, url | image | bitmap | ImageData | canvas)andunregisterIcon; Python
Chart.add_icon(array); Cferrochart_add_icon/ferrochart_remove_icon. - Folding. A per-series
markerStackLimit: crowded bars show the first
markers and a "+k" badge for the rest. Clicking the badge reports a
markerOverflowtarget. - Marker hover. A
markerHoverevent (RustChartEvent::MarkerHover,
Pythonmarker_hover, CFERROCHART_EVENT_MARKER_HOVER) with the marker or
badge under the pointer, its center and size, for tooltips. - Text in any script. Characters the bundled font lacks come from fallback
fonts (WindowOptions::fontsin winit,Chart(fonts=[...])in Python,
ferrochart_add_fontin C,TextEngine::add_fallback_fontin Rust), or on
the web from the browser's own fonts, including color emoji (feature
text-browser, on by default; no fonts are added to the package). A
character no font has is drawn as□. - Grapheme clusters. Text is laid out by grapheme cluster: on the web, an
emoji with a skin tone, a ZWJ sequence (families, professions), a flag or a
letter with a combining accent is drawn as one glyph. Rust:
TextEngine::glyphs, andGlyphSourceis called with a cluster (&str). - C ABI.
ferrochart_set_markerswithFerroChartMarker;
FerroChartSeriesOptions.marker_stack_limit. - Layer plugins'
iconcommand takes the sameimage,label,borderand
borderWidth. The lightweight-charts compatibility layer honors marker
size.
Changed
- Breaking for Rust struct literals (hence 0.4.0): new fields in
Marker,
SeriesOptions,IconInst,GlyphBitmap(rgba, for color glyphs) and
WindowOptions(fonts). The JavaScript, Python and C APIs only add.
Fixed
- A canvas hidden with
display: none(CSS size 0) no longer logs "invalid
render target size" on every change; the chart redraws when it is shown.
Known limitations
- No shaping or right-to-left layout: Arabic and Hebrew do not come out
right. Natively (without the browser), emoji sequences are drawn character
by character.
Packages
- crates.io:
ferrochart-coreand the otherferrochart-*crates, 0.4.0 - npm:
@ferrochart/core@0.4.0 - PyPI:
ferrochart 0.4.0(macOS, Linux, Windows wheels)