Skip to contents

Render webpage with chart

Usage

create_webpage(
  chart_objects,
  html_filename,
  root_dir = ".",
  page_title = "Chart",
  initial_chart = NULL,
  chart_picker_text = NULL,
  view = TRUE
)

Arguments

chart_objects

Either a single highcharterzero object or a list of highcharterzero objects.

html_filename

Name of the saved html file.

root_dir

Path to the webpage root directory

page_title

The text for page's title element.

initial_chart

The name of the list element with the initial chart to show when the page is first loaded.

chart_picker_text

A character vector of the names of the charts to show in the dropdown selection element.

view

View rendered page in browser. Ignored if not running interactively.

Examples

if (FALSE) { # interactive()
data(example_charts)
create_webpage(
  example_charts,
  "example_charts.html",
  "Example Charts",
  "chart1",
  c("Chart 1", "Chart 2", "Chart 3")
)
}