~hrbrmstr/ggchicklet

4b2accf2c18c4eaef4e94e97ec224f8d3fb494b9 — hrbrmstr 4 years ago c59c06f
smarter logic for corner-radius of legend keys
2 files changed, 7 insertions(+), 1 deletions(-)

M R/geom-chicklet.R
M man/geom_chicklet.Rd
M R/geom-chicklet.R => R/geom-chicklet.R +4 -1
@@ 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",

M man/geom_chicklet.Rd => man/geom_chicklet.Rd +3 -0
@@ 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{