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
//! Welcome to Chartistry! This crate provides a flexible way to build charts in [Leptos](https://github.com/leptos-rs/leptos).
//!
//! All charts are built using the [Chart] fn. If you understand this function, you understand this library.
//!
//! ## Examples
//!
//! - See the [demo for Chartistry in action](https://feral-dot-io.github.io/leptos-chartistry/).
//! - There is also an [large, assorted list of examples](https://feral-dot-io.github.io/leptos-chartistry/examples.html) available.
//!
//! Below is an example chart:
//!
//! ```rust
//! use leptos::prelude::*;
//! use leptos_chartistry::*;
//!
//! # use chrono::prelude::*;
//! # struct MyData { x: DateTime<Utc>, y1: f64, y2: f64 }
//! # fn load_data() -> Signal<Vec<MyData>> { Signal::default() }
//!
//! # #[component]
//! # fn SimpleChartComponent() -> impl IntoView {
//! let data: Signal<Vec<MyData>> = load_data(/* pull data from a resource */);
//! view! {
//! <Chart
//! // Sets the width and height
//! aspect_ratio=AspectRatio::from_outer_ratio(600.0, 300.0)
//!
//! // Decorate our chart
//! top=RotatedLabel::middle("My garden")
//! left=TickLabels::aligned_floats()
//! right=Legend::end()
//! bottom=TickLabels::timestamps()
//! inner=[
//! AxisMarker::left_edge().into_inner(),
//! AxisMarker::bottom_edge().into_inner(),
//! XGridLine::default().into_inner(),
//! YGridLine::default().into_inner(),
//! XGuideLine::over_data().into_inner(),
//! YGuideLine::over_mouse().into_inner(),
//! ]
//! tooltip=Tooltip::left_cursor()
//!
//! // Describe the data
//! series=Series::new(|data: &MyData| data.x)
//! .line(Line::new(|data: &MyData| data.y1).with_name("butterflies"))
//! .line(Line::new(|data: &MyData| data.y2).with_name("dragonflies"))
//! data=data
//! />
//! }
//! # }
//! ```
pub use AspectRatio;
pub use Chart;
pub use ;
pub use Edge;
pub use ;
pub use ;
pub use ;
pub use Padding;
pub use ;
pub use ;