Add a bar chart.
(&mut self, mut chart: crate::BarChart)
| 2142 | |
| 2143 | /// Add a bar chart. |
| 2144 | pub fn bar_chart(&mut self, mut chart: crate::BarChart) { |
| 2145 | if chart.bars.is_empty() { |
| 2146 | return; |
| 2147 | } |
| 2148 | |
| 2149 | // Give the elements an automatic color if no color has been assigned. |
| 2150 | if PlotItem::color(&chart) == Color32::TRANSPARENT { |
| 2151 | chart = chart.color(self.auto_color()); |
| 2152 | } |
| 2153 | self.items.push(Box::new(chart)); |
| 2154 | } |
| 2155 | |
| 2156 | /// Add a heatmap. |
| 2157 | pub fn heatmap(&mut self, heatmap: crate::Heatmap) { |
no test coverage detected