Hit-rate chart: a mark every quarter, so the axis reads 0% to 100%
This commit is contained in:
1 parent
dc876b5a5c
commit
46b8dcf274
1 file changed
+9
@@ -235,6 +235,15 @@ fn hit_rate_chart(
|
||||
|point| format!("{} · {:.0}%", fmt::moment_text(point.x.round() as i64), point.y),
|
||||
)
|
||||
.default_y_bounds(0.0, 100.0)
|
||||
// A mark every quarter, so the axis reads 0%, 25%, 50%, 75%, 100%.
|
||||
.y_grid_spacer(|_: GridInput| {
|
||||
(0..=4)
|
||||
.map(|quarter| GridMark {
|
||||
value: quarter as f64 * 25.0,
|
||||
step_size: 25.0,
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.y_axis_formatter(|mark: GridMark, _| format!("{:.0}%", mark.value));
|
||||
let chart = plot.show(ui, |plot| {
|
||||
marks(plot, &view.buckets, step, dark, tz);
|
||||
|
||||
Reference in new issue
Block a user