Repository navigation
Charts in app style: hidden axes and grid, padding, interaction switches,
a crosshair with a dot, themes as objects that change at run time, pools of
many small charts sharing one GPU device, and image export.
Added
-
Appearance. The price axis, the time axis and the grid lines can be
hidden, and the plot area can have padding:ChartOptions.appearance,
Chart::set_appearance,Appearance::sparkline()(no axes, no grid,
2 CSS px of padding). -
Interaction switches.
ChartOptions.interaction/
Chart::set_interactionturn panning, zooming and the crosshair off one
by one (InteractionOptions::none()for all three). Input a switched-off
gesture would take is reported as not consumed, so the page can scroll;
clicks are still reported. -
Crosshair style.
ChartOptions.crosshair_style/
Chart::set_crosshair_style: the vertical line, the horizontal line and
the axis labels each on or off, and an optional dot on the first series'
value (DotStyle, colored like the series at that value). -
Changing the theme.
Chart::set_themereplaces the theme of a chart
that already exists;Chart::themereads it. -
Shared GPU resources.
ferrochart_render_wgpu::SharedResources:
renderers on one device share pipelines and glyph atlases
(WgpuRenderer::offscreen_shared,with_surface_shared,
shared_resources), so many small charts do not each compile the shaders
and hold their own 8 MB of glyph textures. -
JavaScript look options.
FerroChart.createand the new
chart.applyOptionstakepriceAxis,timeAxis,grid,padding,
interaction,crosshairStyleandpreset: 'sparkline';themealso
takes an object of colors on abasetheme and can change after
creation.chart.options()reads them back. -
lightweight-charts compatibility: look options.
layoutcolors and
font size, grid visibility and color,rightPriceScale.visible,
timeScale.visible,handleScroll,handleScaleand the crosshair
lines'visible/labelVisiblenow map to FerroChart, increateChartand
inapplyOptions(layoutno longer has to be set at creation). -
Python look options.
Chart(theme=..., appearance=..., interaction=..., crosshair_style=..., preset="sparkline"),Chart.apply_options(**options)
andChart.options(): the JavaScript look options with snake_case keys;
themealso takes a dict of colors. They draw into_pngand windows and
reach the Jupyter widget. -
C look structs.
FerroChartTheme,FerroChartAppearance,
FerroChartInteractionandFerroChartCrosshairStyle, each with a setter
(ferrochart_set_theme, …) and a getter (ferrochart_theme, …);
ferrochart_theme_default(dark, out)fills a built-in theme to edit. -
Chart pools.
FerroChart.createPool({ renderer })returns a
ChartPoolwhosecreate(canvas, options)makes charts sharing one GPU
device: dozens of sparklines on a page no longer run into the browser's
WebGL context limit. Charts out of the viewport are not drawn.
Rust:ferrochart_render_wgpu::SharedSurfaceand
WgpuRenderer::for_shared_surface;GpuContextisClone. -
Snapshots.
chart.toImageBitmap()andchart.toBlob(type?, quality?)
(PNG, WebP or JPEG), also onFerroPlot.
Changed
- Python:
Chart(attribution_logo=...)defaults toNone: the Jupyter
logo follows the small-canvas rule of the JavaScript binding unless set. - The attribution logo is no longer shown by default on canvases smaller
than 320×160 CSS px (it follows the size);attributionLogo: trueor
setAttributionLogo(true)still shows it anywhere. - With panning or zooming switched off, the canvas'
touch-actionlets the
page take those gestures. - Breaking for Rust struct literals: new fields
appearance,
interactionandcrosshair_styleinChartOptions.
testing::quote_card_sceneis new.
Packages
- crates.io:
ferrochart-coreand the otherferrochart-*crates, 0.6.0 - npm:
@ferrochart/core@0.6.0 - PyPI: 0.6.0 wheels will follow once the Linux and Windows builds are ready;
ferrochart 0.4.0is the latest there.