| 59 | /// Base class for all charts. |
| 60 | #[derive(Default, Clone)] |
| 61 | pub struct BaseChart<'a, C, E, M, D, O> |
| 62 | where |
| 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 | |
| 93 | impl<'a, C, E, M, D, O> BaseChart<'a, C, E, M, D, O> |
| 94 | where |
nothing calls this directly
no outgoing calls
no test coverage detected