charts 0.3.0

A pure Rust visualization library inspired by D3.js
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use svg::node::element::Group;
use crate::components::legend::LegendEntry;

pub mod vertical_bar;
pub mod horizontal_bar;
pub mod scatter;
pub mod datum;
pub mod line;
pub mod area;

/// A trait that defines a View of a dataset that can be rendered within a chart.
pub trait View<'a> {
    fn to_svg(&self) -> Result<Group, String>;

    fn get_legend_entries(&self) -> Vec<LegendEntry>;
}