Repository navigation
FerroChart 0.5.0
Markers that carry your data, clustering across bars, bar quality flags
and touch screens.
Added
- Marker ids. Markers take an
id(u64; in JavaScript an integer up
to 2^53−1) that click and hover events report. In JavaScript the events
also hand back the very object passed tosetMarkersasmarker, with
any fields of your own. - Markers at a price. A third position,
atPrice(Rust
MarkerPosition::AtPrice, Python"at_price", C
FERROCHART_MARKER_AT_PRICE), centers a marker on itsprice, for fills
and other events at an exact price. These markers are not stacked or
clustered. - Clustering across bars. A per-series
markerCluster(CSS px; Python
marker_cluster): when bars get closer than that, each side of a bucket
of bars shows its first marker and a "+k" badge. Buckets are aligned to
the logical index, so panning does not regroup. Click and hover events
for a badge report the bars it stands for (bars: { from, to }). - Bar quality flags.
setBarFlags([{ time, filled?, clipped? }])(Rust
Chart::set_bar_flags, Pythonset_bar_flags, C
ferrochart_set_bar_flags).filled: a bar the data source filled in
without trades, drawn hollow infilledBarColor.clipped: a bar whose
outlier wick you clipped (keep the raw values for your tooltip); a tick
marks each end of the wick. The flags survive level-of-detail merging. - The lightweight-charts compatibility layer maps v5
atPriceTop,
atPriceMiddleandatPriceBottomtoatPriceand passes numeric ids. - Examples: a meme token's reality layer (filled and clipped bars,
clustered wallet avatars, wallet cards from the clicked marker) and an LP
risk canvas (range, hedge liquidation, events at their price). - Touch screens. On phones, tablets and touch laptops: two fingers zoom
and pan, a long press (500 ms) shows the crosshair, which stays after the
finger lifts until the next tap, and drawings, handles and markers are
easier to hit with a finger. A double tap is a double click. Plots zoom
and pan with two fingers and show the hovered element under the finger. touchScrollcreation option in JavaScript ('chart', the default,
or'page') andsetTouchScroll: with'page'a vertical swipe scrolls
the page, so charts inside articles no longer trap scrolling.- Desktop windows (winit, Python) now handle touch input.
Changed
- Breaking for Rust struct literals and matches (hence 0.5.0): new fields
inMarker(id,price),SeriesOptions(marker_cluster,
filled_bar_color),MarkerHit(id,bars),ClickTarget::Marker
(id) andClickTarget::MarkerOverflow(id,bars); a new
MarkerPosition::AtPrice. - C:
FerroChartMarker,FerroChartSeriesOptionsandFerroChartEvent
have new fields, so programs built against 0.4 must be recompiled with
the new header. The JavaScript and Python APIs only add. - Breaking for Rust code that builds input events:
PointerDown,
PointerMoveandPointerUphave akind: PointerKindfield (Mouse,
Touch,Pen), and there is a newInputEvent::PointerCancel. In C,
FerroChartInputgainspointer_kindat the end (programs built with the
shorter struct keep working as mouse input) and
FERROCHART_INPUT_POINTER_CANCEL. - In the browser a cancelled pointer (the page took the gesture over) no
longer counts as a click.
Fixed
- Real-time updates of sparse line series (#1).
On a line, area or baseline series with points on only some bars,
update_lastnow moves the interpolated points before the last one
with it, asset_dataof the same points would. It returns
DataChange::Replacein that case, since more than the last value
changed. Histograms keep their gaps. - Gann fan labels that would overlap near the origin are not drawn.
- Plot: the left and right axes are wide enough for their rule labels.
- Jupyter: the operations recorded for a live chart stay bounded, so
views opened later load quickly.
Packages
- crates.io:
ferrochart-coreand the otherferrochart-*crates, 0.5.0 - npm:
@ferrochart/core@0.5.0 - PyPI: 0.5.0 wheels will follow once the Linux and Windows builds are ready;
ferrochart 0.4.0is the latest there.