slintplot-gallery 0.5.1

Sample browser for SlintPlot: every chart type, with live data editing, themes and dark mode
# slintplot-gallery


The sample browser for [SlintPlot](https://slintplot.dev), native interactive
charts for [Slint](https://slint.dev): every chart type, with buttons to
randomize, add and remove data, a theme selector and dark mode.

```sh
cargo install slintplot-gallery
slintplot-gallery                    # open the app
slintplot-gallery --snapshot <dir>   # render every sample to PNG, without a window
```

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://slintplot.dev/screenshots/tour-anim-dark.webp">
  <img src="https://slintplot.dev/screenshots/tour-anim.webp" alt="The gallery app: hovering the bars of a bar chart shows tooltips, Randomize moves the bars to new values, and the radial bar and Gantt charts open from the sample list">
</picture>

## Renderers


The app draws with Slint's FemtoVG renderer (on the GPU) by default. Pick
another with `SLINT_BACKEND`; Skia needs the app built with its `skia`
feature:

```sh
SLINT_BACKEND=winit-software slintplot-gallery      # Slint's software renderer, on the CPU
SLINT_BACKEND=winit-femtovg slintplot-gallery       # FemtoVG, the default
cargo install slintplot-gallery --features skia
SLINT_BACKEND=winit-skia slintplot-gallery          # Skia, on the GPU
```

`ui/gallery.slint` has a working example of every chart. The code button
(`</>`) at the top right shows the sample as a small Rust app, a file per tab:
`ui/app.slint`, the sample's code taken from that file at build time, as a
complete window with the data the chart shows at that moment; `src/main.rs`,
`build.rs` and `Cargo.toml`; and How to run, the steps from the files to a
running chart. Copy copies the tab shown. In the Gantt sample, clicking a task
opens a dialog that edits its name, group, dates and progress, and the chart
updates when you save. Clicking a chart shows the click callback and what
was clicked, such as `slice-clicked: Safari, 19`, at the bottom right.

On Linux, Slint needs the fontconfig and xkbcommon development packages first
(`libfontconfig-dev` and `libxkbcommon-dev` on Debian and Ubuntu).

Documentation: [slintplot.dev](https://slintplot.dev). The gallery also
runs [in your browser](https://slintplot.dev/demo/).

## License


SlintPlot is available under your choice of three licenses:
[the GPLv3](https://github.com/trondegil/slintplot/blob/main/LICENSE-GPL-3.0.txt),
[the PolyForm Noncommercial License 1.0.0](https://github.com/trondegil/slintplot/blob/main/LICENSE-POLYFORM-NC.md)
(free for any noncommercial use) or
[a commercial license](https://github.com/trondegil/slintplot/blob/main/COMMERCIAL.md),
for commercial use without the GPLv3's conditions, such as in closed-source
software you sell or ship. Commercial licenses are per developer, per year,
from €99, and half price for the first two years when bought by 31 December
2027: see [Pricing](https://slintplot.dev/#pricing). The full terms are in
[LICENSE.md](https://github.com/trondegil/slintplot/blob/main/LICENSE.md).

SlintPlot is an independent project. It is not affiliated with, endorsed by or sponsored by SixtyFPS GmbH or the Slint project. Slint and the Slint logo are trademarks of SixtyFPS GmbH.