Browse Source

smarter logic for corner-radius of legend keys

master
boB Rudis 5 years ago
parent
commit
4b2accf2c1
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 5
      R/geom-chicklet.R
  2. 3
      man/geom_chicklet.Rd

5
R/geom-chicklet.R

@ -27,6 +27,9 @@
#' - `linetype`
#' - `size`
#'
#' Use both `fill` and `group` when you want a fill colour per-segment but
#' want to order the segments by another column (as in the Examples).
#'
#' @inheritParams ggplot2::layer
#' @inheritParams ggplot2::geom_point
#' @inheritParams ggplot2::geom_col
@ -70,7 +73,7 @@ geom_chicklet <- function(mapping = NULL, data = NULL,
draw_key_rrect <- function(data, params, size) { # nocov start
grid::roundrectGrob(
r = params$radius,
r = min(params$radius, unit(3, "pt")),
default.units = "native",
width = 1, height = 0.6,
name = "lkey",

3
man/geom_chicklet.Rd

@ -91,6 +91,9 @@ left-to-right/bottom-to-top == earliest to latest order).
\item \code{linetype}
\item \code{size}
}
Use both \code{fill} and \code{group} when you want a fill colour per-segment but
want to order the segments by another column (as in the Examples).
}
\examples{

Loading…
Cancel
Save