From f0dc12afc14e473d31dc95d97885321c02c01092 Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 21 Sep 2016 17:11:13 -0300 Subject: [PATCH] testing adding dependencies --- devscripts/htmlDependency.R | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 devscripts/htmlDependency.R diff --git a/devscripts/htmlDependency.R b/devscripts/htmlDependency.R new file mode 100644 index 00000000..363b5b2f --- /dev/null +++ b/devscripts/htmlDependency.R @@ -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