[tor-commits] [metrics-web/master] Always show 1 decimal digit in dirbytes graph.
karsten at torproject.org
karsten at torproject.org
Mon Jan 27 11:35:32 UTC 2020
commit 2ce63d57a67aca6d799ef4665abd3916191e6e30
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon Jan 27 12:29:00 2020 +0100
Always show 1 decimal digit in dirbytes graph.
Fixes #33066.
---
src/main/R/rserver/rserve-init.R | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/R/rserver/rserve-init.R b/src/main/R/rserver/rserve-init.R
index c4f1b7f..df6da79 100644
--- a/src/main/R/rserver/rserve-init.R
+++ b/src/main/R/rserver/rserve-init.R
@@ -486,7 +486,7 @@ plot_dirbytes <- function(start_p, end_p, path_p) {
geom_line() +
scale_x_date(name = "", breaks = custom_breaks,
labels = custom_labels, minor_breaks = custom_minor_breaks) +
- scale_y_continuous(name = "", labels = unit_format(unit = "Gbit/s"),
+ scale_y_continuous(name = "", labels = function(x) sprintf("%.1f Gbit/s", x),
limits = c(0, NA)) +
scale_colour_hue(name = "",
breaks = c("dirwrite", "dirread"),
More information about the tor-commits
mailing list