From 71f415280dc3e757bcaad779e9340579658388bc Mon Sep 17 00:00:00 2001 From: da-ta-vinci21 Date: Sun, 26 Jun 2016 21:48:55 +0530 Subject: [PATCH] Facet labels are now abbreviated for .plot_interactive_time() - Change made in R/plot_metrics.R - Example: Label for a test named "check now if 12345" will appear as "che...345", i.e., first 3 characters and last 3 characters separated by an ellipsis. Change as discussed in Issue #15 --- R/plot_metrics.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/plot_metrics.R b/R/plot_metrics.R index d8d7aa2f..698eee7f 100644 --- a/R/plot_metrics.R +++ b/R/plot_metrics.R @@ -168,6 +168,12 @@ plot_metrics <- function(test_path, metric, num_commits = 5, save_data = FALSE, remoteUrl <- git2r::remote_url(repo = git2r::repository(path = "./")) remoteUrl <- (paste0(remoteUrl, "/commit/")) time_data$remoteUrl <- paste0(remoteUrl, time_data$sha) + + levels(time_data$test_name) <- paste0(substr(levels(time_data$test_name), start = 0, stop = 4), + "...", + substr(levels(time_data$test_name), + start = nchar(levels(time_data$test_name)) - 4, + stop = nchar(levels(time_data$test_name)))) test_plot <- ggplot2::ggplot() + ggplot2::geom_point(mapping = ggplot2::aes(x = message, y = metric_val,