hc_view | R Documentation |
Allows viewing of hcslim output in RStudio.
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
)
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). |
Creates a temp HTML file and shows it in the viewer.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.