hc_view: View hcslim result in viewer. (Deprecated, replaced with...

View source: R/hc_view.R

hc_viewR Documentation

View hcslim result in viewer. (Deprecated, replaced with hc_widget)

Description

Allows viewing of hcslim output in RStudio.

Usage

hc_view(
  options,
  class = c("chart", "mapChart", "stockChart", "ganttChart"),
  usecode_include = ifelse(class[1] == "mapChart", "maps/highmaps", "highcharts"),
  loadmapfromurl = NULL,
  pretty = printjs,
  printjs = FALSE,
  printtempfile = FALSE,
  printhtml = FALSE
)

Arguments

options

Highcharts options for the chart. Includes data, chart type, etc.

class

"chart" in Highcharts.chart(... For Highmaps, it should be "mapChart".

usecode_include

Required Highcharts modules that you'd pass to hcslim::usecode().

loadmapfromurl

If you are using a map, this is the URL of the topo.json file. Example: 'https://code.highcharts.com/mapdata/countries/us/us-ca-all.topo.json'

pretty

Use pretty formatting when converting options to JSON.

printjs

Print completed JS to console for troubleshooting or pasting into jsFiddle.

printtempfile

Print the location of the temporary HTML file (helpful for troubleshooting).

printhtml

Print the HTML code used for Viewer (helpful for troubleshooting).

Value

Creates a temp HTML file and shows it in the viewer.

Examples

## Not run: 

require(hcslim)

options = list(
 chart = list(type = 'line'),
 title = list(text = 'Some Numbers'),
 yAxis = list(
     title = list(
         text = '123456'
     )
 ),
 series = list(
     list(
       name = '123',
       data = c(1, 2, 3)
     ),
     list(
       name = '456',
       data = c(4, 5, 6)
     )
 )
)

hcslim_view(options)


## End(Not run)

superchordate/hcslim documentation built on Feb. 20, 2025, 3:28 p.m.