1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//! A declarative, DataFrame-native chart library for [Polars](https://pola.rs).
//!
//! charcoal turns a Polars [`polars::frame::DataFrame`] into a publication-quality SVG,
//! standalone HTML, or PNG with a single builder chain — no browser, no Python, no C FFI.
//!
//! # Feature Flags
//!
//! | Feature | Enables | Extra dependency |
//! |---------|---------|-----------------|
//! | *(default)* | SVG and HTML output | — |
//! | `static` | [`Chart::save_png`] via pure-Rust `resvg` | `resvg` |
//! | `notebook` | [`Chart::display`] inline in evcxr Jupyter | `evcxr_runtime` |
//!
//! # Quickstart
//!
//! ```rust,no_run
//! use charcoal::{Chart, Theme};
//! use polars::prelude::*;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let df = CsvReader::from_path("iris.csv")?.finish()?;
//!
//! let chart = Chart::scatter(&df)
//! .x("sepal_length")
//! .y("sepal_width")
//! .color_by("species")
//! .title("Iris Dataset")
//! .theme(Theme::Default)
//! .build()?;
//!
//! chart.save_html("iris.html")?;
//! Ok(())
//! }
//! ```
//!
//! # Examples
//!
//! Runnable examples for every chart type live in the `examples/` directory:
//!
//! ```text
//! cargo run --example scatter_iris
//! cargo run --example line_timeseries
//! cargo run --example bar_categorical
//! cargo run --example histogram_distribution
//! cargo run --example heatmap_correlation
//! cargo run --example box_plot_groups
//! cargo run --example area_stacked
//! ```
//!
//! # Notebook Usage
//!
//! To display charts inline in an [evcxr](https://github.com/evcxr/evcxr) Jupyter
//! notebook, enable the `notebook` feature:
//!
//! ```toml
//! [dependencies]
//! charcoal = { version = "0.1", features = ["notebook"] }
//! ```
//!
//! In your first notebook cell, load the dependency:
//!
//! ```text
//! :dep charcoal = { version = "0.1", features = ["notebook"] }
//! use charcoal::Chart;
//! ```
//!
//! Then call `.display()` as the last expression in any subsequent cell:
//!
//! ```rust,no_run
//! # use charcoal::Chart;
//! # let df = polars::frame::DataFrame::empty();
//! let chart = Chart::scatter(&df).x("x").y("y").build()?;
//! # #[cfg(feature = "notebook")]
//! chart.display();
//! # Ok::<(), charcoal::CharcoalError>(())
//! ```
//!
//! # Repository
//!
//! <https://github.com/your-handle/charcoal>
pub use Chart;
pub use ;
pub use FillMode;
pub use PointDisplay;
pub use BinMethod;
pub use ;
pub use ;