MCPcopy Create free account
hub / github.com/angular-rust/ux-charts / BaseChart

Class BaseChart

src/basechart.rs:61–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59/// Base class for all charts.
60#[derive(Default, Clone)]
61pub struct BaseChart<'a, C, E, M, D, O>
62where
63 C: CanvasContext<Pattern>,
64 E: Entity,
65 M: fmt::Display,
66 D: fmt::Display + Copy,
67 O: BaseOption<'a>,
68{
69 pub props: RefCell<BaseChartProperties>,
70 /// The data table that stores chart data
71 /// Row 0 contains column names.
72 /// Column 0 contains x-axis/pie labels.
73 /// Column 1..n - 1 contain channel data.
74 pub data: DataStream<'a, M, D>,
75
76 /// The drawing options initialized in the constructor.
77 pub options: O,
78
79 /// The main rendering context.
80 pub context: Option<C>,
81
82 /// The rendering context for the axes.
83 // pub ctx: Option<C>,
84
85 /// The rendering context for the channel.
86 // pub ctx: Option<C>,
87
88 /// The precalcuated datas
89 /// A ChartChannel keep track of the visibility of the channel.
90 pub channels: RefCell<Vec<ChartChannel<E>>>,
91}
92
93impl<'a, C, E, M, D, O> BaseChart<'a, C, E, M, D, O>
94where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected