mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-08-26 18:36:03 +00:00
metrics: report: improve interface y axis divs
Most of the time we have 0 interface errors or drops, so we pin the y scale to '1', so we don't hit 'infinity' errors. That left us with a strange y-axis label anomoly - as the axis was automatically divided into 5 labels, and we got for some reason the sequence '0,0,0,1,1'. That just plain looked wrong and confusing. Fix it by using `pretty_breaks()` for the error/drop y axis, whilst maintaining the `comma` count for the pod count y axis. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
committed by
Graham Whaley
parent
9431dd9f38
commit
68a62f50bc
@@ -657,7 +657,7 @@ interface_drop_line_plot <- ggplot() +
|
||||
labs(colour="") +
|
||||
xlab("seconds") +
|
||||
ylab("drops") +
|
||||
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./drop_scale, name="pods")) +
|
||||
scale_y_continuous(breaks=pretty_breaks(), sec.axis=sec_axis(~ ./drop_scale, name="pods", labels=comma)) +
|
||||
ggtitle("interface drops") +
|
||||
theme(legend.position="bottom") +
|
||||
theme(axis.text.x=element_text(angle=90))
|
||||
@@ -692,7 +692,7 @@ interface_error_line_plot <- ggplot() +
|
||||
labs(colour="") +
|
||||
xlab("seconds") +
|
||||
ylab("errors") +
|
||||
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./error_scale, name="pods")) +
|
||||
scale_y_continuous(breaks=pretty_breaks(), sec.axis=sec_axis(~ ./error_scale, name="pods", labels=comma)) +
|
||||
ggtitle("interface errors") +
|
||||
theme(legend.position="bottom") +
|
||||
theme(axis.text.x=element_text(angle=90))
|
||||
|
||||
Reference in New Issue
Block a user