Skip to contents

Helper for creating a radar chart

Usage

bb_radarchart(bb, data, mapping = NULL, ...)

Arguments

bb

A `billboard` `htmlwidget` object.

data

A `data.frame`, the first column will be used for x axis unless specified otherwise in `mapping`. If not a `data.frame`, an object coercible to `data.frame`.

mapping

Mapping of variables on the chart, see [bbaes()].

...

Arguments passed to [bb_radar()].

Value

A `billboard` `htmlwidget` object.

Examples

library("billboarder")

# data about Avengers
data("avengers_wide")

# if not specified, first column is used as x-axis,
# all others are used on y-axis
billboarder() %>%
  bb_radarchart(data = avengers_wide)
# specify explicitly which column to use with mapping billboarder() %>% bb_radarchart( data = avengers_wide, mapping = bbaes(x = axis, y = `Captain America`) )
# with data in "long" format you can use "group" aesthetics data("avengers") billboarder() %>% bb_radarchart( data = avengers, mapping = bbaes(x = axis, y = value, group = group) )