Skip to content

Commit

Permalink
testing adding dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkunst committed Sep 21, 2016
1 parent 3834dea commit f0dc12a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions devscripts/htmlDependency.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
library(highcharter)
library(htmltools)


hc <- highchart() %>%
hc_chart(type = "column") %>%
hc_title(text = "MyGraph") %>%
hc_add_series(data = c(4, 14, 18, 5, 6, 5, 14, 15, 18)) %>%
hc_xAxis(categories = list(
list(
name = "Fruit",
categories = list("Apple", "Banana", "Orange")
),
list(
name = "Vegetable",
categories = list("Carrot", "Potato", "Tomato")
),
list(
name = "Fish",
categories = list("Cod", "Salmon", "Tuna")
)
))

hc

dep <- htmlDependency(
name = "grouped-categories",
version = "1.1.0",
src = c(
href = "http://blacklabel.github.io/grouped_categories"
),
stylesheet = "css/styles.css",
script = "grouped-categories.js"
)

hc$dependencies <- c(hc$dependencies, list(dep))

hc

0 comments on commit f0dc12a

Please sign in to comment.