MCPcopy Create free account
hub / github.com/emilk/egui_plot / bar_chart

Method bar_chart

egui_plot/src/plot.rs:2144–2154  ·  view source on GitHub ↗

Add a bar chart.

(&mut self, mut chart: crate::BarChart)

Source from the content-addressed store, hash-verified

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) {

Callers 2

show_plotMethod · 0.80
show_plotMethod · 0.80

Calls 3

is_emptyMethod · 0.80
auto_colorMethod · 0.80
colorMethod · 0.45

Tested by

no test coverage detected