Skip to contents

The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or points in case of pie charts) is represented by a symbol and its name in the legend.

Usage

hc_legend(hc, ...)

Arguments

hc

A highchart htmlwidget object.

...

Options defined in https://api.highcharts.com/highcharts/legend.

Details

It is possible to override the symbol creator function and create custom legend symbols.

Examples

# Identify each line near its endpoint instead of matching distant colors.
highcharts_demo() |>
  hc_legend(layout = "proximate", align = "right", verticalAlign = "top")