We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a70b4f3 commit 8ae2049Copy full SHA for 8ae2049
common/src/console_out/mod.rs
@@ -268,6 +268,7 @@ pub fn console_chart_a(chart_a: ChartA) {
268
let up_max_value = *chart_a.up_map.values().max().unwrap_or(&0);
269
let down_max_value = *chart_a.down_map.values().max().unwrap_or(&0);
270
let max_value = up_max_value.max(down_max_value);
271
+ let max_value = max_value.max(1);
272
let max_height = 50;
273
// 打印条形图
274
for key in &keys {
@@ -342,6 +343,7 @@ pub fn console_chart_b(chart_b: ChartB) {
342
343
}
344
fn console_chart_b_list(list: Vec<usize>) {
345
let max_value = *list.iter().max().unwrap_or(&0);
346
347
let max_height = max_value.min(20);
348
// 遍历从最大高度到0
349
for i in (0..=max_height).rev() {
0 commit comments