| Crates.io | visualize-yew |
| lib.rs | visualize-yew |
| version | 0.21.3 |
| created_at | 2024-06-23 11:04:38.501212+00 |
| updated_at | 2025-06-05 01:46:56.76464+00 |
| description | A simple data visualization library for Yew |
| homepage | |
| repository | https://github.com/elonaire/visualize-yew |
| max_upload_size | |
| id | 1281128 |
| size | 97,530 |
This is a simple crate to help you visualize your data in the browser using Yew. It is a wrapper around the yew crate that provides a simple API to create charts.
Note: This crate is NOW available for use, all charts are customizable to your liking.
New/Upcoming Features:
This crate is built using the Yew framework and uses HTML5 canvas to render the charts.
PieChart
LineChart
BarChart
DoughnutChart
Add the following to your Cargo.toml:
[dependencies]
visualize-yew = { version = "0.2x.x", features = ["PieChart"] }
use visualize_yew::pie_chart::{DataPoint as PieChartData, PieChart};
#[function_component]
fn Home() -> Html {
let mut pie_chart_config = PieChartConfig::default();
pie_chart_config.show_legend = true;
let pie_data = vec![
PieChartData::new("A", 10, ""),
PieChartData::new("B", 20, ""),
PieChartData::new("C", 30, ""),
PieChartData::new("D", 40, ""),
];
html! {
// Chart will take the full width of the parent container
<div>
<PieChart data={pie_chart_data} config={pie_chart_config} />
</div>
}
}
This project is licensed under both the MIT license and the Apache License (Version 2.0).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, shall be dual licensed as above, without any additional terms or conditions.
This project is inspired by the Chart.js library for JavaScript.