data_draw: Create data for a Highcharts plot

View source: R/utils.R

data_drawR Documentation

Create data for a Highcharts plot

Description

This function creates data for a Highcharts plot, given input data and options.

Usage

data_draw(
  data,
  dic = NULL,
  var_cat = NULL,
  var_num = NULL,
  var_date = NULL,
  viz = NULL,
  frType = NULL,
  opts = NULL
)

Arguments

data

a data frame containing the data to be plotted

dic

a named vector specifying the categories and colors for the data

var_cat

the name of the categorical variable in the data frame

var_num

the name of the numeric variable in the data frame

var_date

the name of the date variable in the data frame

viz

the type of visualization to be created ("treemap", "line", "bar", "pie", or "donut")

frType

a string indicating the format of the data frame (e.g., "CatNum", "DatNum", "CatCatNum")

opts

a list containing options for the plot (e.g., tooltip_template, na_label, format_sample_num)

Value

a list of data for use in creating a Highcharts plot


randommonkey/hgchmagic documentation built on Aug. 23, 2023, 5:56 a.m.