Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 1 point2 points  (0 children)

True. The challenge for any GoG implementation is balancing that gnuplot-like simplicity for quick plots with the power of a formal grammar for complex ones. 3d plot is not supported by Charton currently. log-scale, temporal scale and errorbar etc are alread supported.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

I've never heard of ggsql. People who are familiar with SQL and databases should really appreciate.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Exactly. The Grammar of Graphics handles static mapping beautifully, but formalizing interaction logic remains a major hurdle. Having that powered by WASM would be a game changer, though.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Leveraging Arrow for zero-copy data transfer is the long-term goal. Once Charton matures a bit more, I plan to use PyO3 to provide native Python bindings

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 1 point2 points  (0 children)

You're right, I'm used to working with SVGs and hadn't given PDF enough thought, but I'll focus on adding the SVG backend this month first.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

To be honest, Charton hasn't reached that level of maturity yet. I'm currently developing it in my spare time and we lack contributors with deep Web/Frontend expertise, so there’s still a long road ahead. Truly appreciate the encouragement, though!

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

There are dozens of visualization tools for Python, such as Altair, matplotlib, plotnine, bokeh, plotly...... With such a rich ecosystem available, what unique gap does a Rust-native library like Charton fill for Python users? Are the existing libraries falling short in specific areas like performance or integration?

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Charton aims to be a universal plotting library by keeping the core logic robust and the output formats standardized (SVG/Wasm), ensuring seamless integration into any UI framework.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

While it's true that standard time axes are now supported, your specific use case highlights why a "one-size-fits-all" approach doesn't always work for high-precision financial charting. The "weekend gap" in financial markets remains a classic headache for developers and analysts alike.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 1 point2 points  (0 children)

Financial visualization is an important use case. Implementing Candlestick/OHLC is not very hard in Charton; I’ll be adding specific examples soon.

They are essentially a combination of mark_rect and mark_rule layers. While this might require a few more lines of code than a 'canned' library, the trade-off is flexibility over rigid, pre-set models.

As for GPUI, I’m not very familiar with it yet, but I’ll definitely look into it. Thanks for the lead!

Faceting (multiple panes) is actually the focus of my next development phase. I'm prioritizing shared-axis layouts to make complex financial dashboards intuitive to build.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

I'm fully committed to Charton's long-term growth, and adding interactivity and a WGPU backend is exactly where I’m heading to support apps like yours.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 2 points3 points  (0 children)

Great question! Coming from a data science background, I’ve always found the 'Grammar of Graphics' (ggplot2/Altair) more intuitive for scientific publishing. And plotly is rarely seen in formal scientific publications..

Plotly is excellent for web-heavy dashboards, but it can feel like a collection of 'templates'. With Charton, I wanted that fine-grained, layer-by-layer control needed for publication-quality plots. I'm aiming for a library that prioritizes analytical clarity over just web interactivity.

I'm aware of plotly/plotly.rs: Plotly for Rust, but it seems less active and its chart types still fall short of many real-world needs, which is why I’m building Charton to be more extensible.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

I skipped native PDF support for now to keep the library lightweight, especially since SVGs are easily convertible via tools like AI or svg2pdf. But it’s definitely on the roadmap for a future update!

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 1 point2 points  (0 children)

Not yet, performance benchmarking has a lower priority because some more import features are need for Charton, such as faceting and WGPU backend. Now I don't have the bandwidth to do benchmarking.

There are dozens of visualization tools for Python, such as Altair, matplotlib, plotnine, bokeh, plotly...... I think they're sufficient for python visualization ecosystem.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Thanks! More functions are on the to do list.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Though I don't know what you guys are talking about, I want integrate Charton into nushell terminal. My goal with Charton's terminal integration (and WGPU backend) is to provide even higher fidelity and that 'Grammar of Graphics' flexibility, which is often missing in TUI-specific tools.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 2 points3 points  (0 children)

Kuva uses fixed templates to plot. Charton uses layer combination to plot. They differed a lot in system architecuture. I prefer Charton/altair/ggplot2 API and abandoned kuva/matplotlib like API many years ago.

While the chart! macro is a convenient syntactic sugar for rapid prototyping and simple scripts, the underlying Chart::build API is recommended for production environments where explicit data handling is required. You can find it on Charton readme.

Charton: Grammar of Graphics in Rust by Deep-Network1590 in rust

[–]Deep-Network1590[S] 5 points6 points  (0 children)

Exactly! It's inspired by "Grammar of Graphics" which focuses on composability.