This function is a wrapper around the Highstock.js library. Currently, this is still an early development version, so there are still quite many glitches.
1 2 3 4 5 | highstocks(data = NULL, x = NULL, y = NULL, group = NULL,
type = "scatter", title = "Test", xAxis = list(title = list(text =
"Fruit Eaten 1")), yAxis = list(title = list(text = "Fruit Eaten 2")),
width = NULL, height = NULL, chartOpts = list(), creditsOpts = list(),
exportingOpts = list(), plotOptions = list())
|
data |
A data.frame or data.table object, which must be in a long format. |
x |
Name of the x-axis variable. 'highstocks' function expects this to be formatted a s a date. |
y |
Name of the y-axis variable. |
group |
Name of the group variable. Default is NULL. |
type |
Type of graph to be produced. Currently, this wrapper supports only a line option. |
title |
Title of the graph. |
xAxis |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
yAxis |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
width |
Width of the graph... |
height |
Height of the graph... |
chartOpts |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
creditsOpts |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
exportingOpts |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
plotOptions |
A named list of options to be passed to the Highstock API (see http://api.highcharts.com/highstock for details) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.