Skip to content

Commit

Permalink
Facet labels are now abbreviated for .plot_interactive_time()
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
analyticalmonk committed Jun 26, 2016
1 parent 0bdbdb0 commit 71f4152
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/plot_metrics.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 71f4152

Please sign in to comment.