r-highcharter

Highcharter - add multiple text annotations

我是研究僧i 提交于 2019-12-11 06:11:15
问题 I have a stacked column plot where I need a text annotation below each column. I only found a way to add one annotation. Adding a second annotation yields the error All arguments must be named list . Sadly, I have know clue how to use the hc_annotations function. Here is a little working example and code bits I tried: hc <- highchart() %>% hc_chart(type = "column") %>% hc_plotOptions(column = list(stacking = "normal")) %>% hc_title(text = "Plot with Annotations", useHTML = TRUE) %>% hc_yAxis

Highcharter - Click event to filter data from graph

守給你的承諾、 提交于 2019-12-11 01:35:58
问题 I am using highcharter and I want to be able to add a click event to my graph that when I click on a bar (whether its top level or drilldown), it filters the data table below it to contain the same information. I've checked this SO question which shows how to implement the the Java to R to contain a click function but not how to use that information to filter data / choose the correct data set. Hyperlink bar chart in Highcharter Any help would be greatly appreciated! An example code is below:

Customize colors for boxplot with highcharter

怎甘沉沦 提交于 2019-12-10 23:32:00
问题 I have boxplots on highcharter and I would like to customize both the Fill color Border color Here is my code df = data.frame(cbind(categ = rep(c('a','b','c','d')),value = rnorm(1000))) hcboxplot(var = df$categ, x = as.numeric(df$value)) %>% hc_chart(type = "column") %>% hc_colors(c("#203d7d","#a0a0ed","#203d7e","#a0a0ad")) The hc_colors works only if I put var2 instead of var but then the box plot are shrunken... 回答1: I made a couple functions to do some stuff with highcharts and boxplots.

Facet function in highcharts

拟墨画扇 提交于 2019-12-10 19:33:07
问题 I have a data like this example: df <- data.frame( date = seq(as.Date("2015-01-01"), as.Date("2015-12-31"), 100), id = rep(LETTERS, each = 4)[1:100], replicate(2, sample(1001, 100)) ) Plotting with ggplot is Ok ggplot(df, aes(x = date)) + geom_line(aes(y = X1)) + geom_line(aes(y = X2), linetype = 2) + facet_wrap( ~ id , scales = "free") I found some info about facet implementation in highchart higcharter-grid-test and I tried to plot it with highchart in order to make an interactive plot, but

HighCharts Sankey Diagram in R

对着背影说爱祢 提交于 2019-12-08 11:08:20
问题 I'd like to create a sankey diagram using the highcharter library in R. Usually I'm just able to look at the javascript code for the plot and translate it for R, but for sankey plots I'm having some trouble. I'd like to just start by creating something like this: http://jsfiddle.net/highcharts/z2rL672w/3/ Here's my attempt so far. I'm having trouble where to place the "keys" argument. highchart() %>% hc_chart(type='sankey') %>% hc_add_series_list( list( keys=c('from', 'to', 'weight') ), list(

Highcharter deprecated function's output is different than suggested

一曲冷凌霜 提交于 2019-12-05 19:52:27
I am producing a time series plot with Josh Kunst's excellent highcharter library in R. Using this data: > dput(t) structure(c(2, 2, 267822980, 325286564, 66697091, 239352431, 94380295, 1, 126621669, 158555699, 32951026, 23, 108000151, 132505189, 29587564, 120381505, 25106680, 117506099, 22868767, 115940080, 22878163, 119286731, 22881061), .Dim = c(23L, 1L), index = structure(c(1490990400, 1490994000, 1490997600, 1491001200, 1491004800, 1491008400, 1491012000, 1491026400, 1491033600, 1491037200, 1491040800, 1491058800, 1491062400, 1491066000, 1491069600, 1491073200, 1491076800, 1491109200,

How can I get highcharter to represent a forecast object?

余生颓废 提交于 2019-12-02 13:16:59
问题 This is a follow-on to this question. I am trying to get the pipeline given in that question to accept a forecast object as input: Again, using this data: > dput(t) structure(c(2, 2, 267822980, 325286564, 66697091, 239352431, 94380295, 1, 126621669, 158555699, 32951026, 23, 108000151, 132505189, 29587564, 120381505, 25106680, 117506099, 22868767, 115940080, 22878163, 119286731, 22881061), .Dim = c(23L, 1L), index = structure(c(1490990400, 1490994000, 1490997600, 1491001200, 1491004800,

How to set highchart global options IN R

被刻印的时光 ゝ 提交于 2019-12-01 13:59:46
I see a lot of examples in javascript but I cannot find an example to do it in R Here is the api link: http://api.highcharts.com/highcharts#global I am trying to set "timezoneOffset" and I have tried many different ways. When I do this in R: highChart$global(timezoneOffset=-300) I do not get any warning or error, but it's not working. Thanks a lot for the help! Here is a piece of code: library(rCharts) highChart <- Highcharts$new() highChart$global(timezoneOffset=-300) highChart$chart(zoomType = "xy") highChart$exporting(enabled = T) highChart$xAxis(type="datetime",list( title = list(text =

How to set highchart global options IN R

社会主义新天地 提交于 2019-12-01 12:32:45
问题 I see a lot of examples in javascript but I cannot find an example to do it in R Here is the api link: http://api.highcharts.com/highcharts#global I am trying to set "timezoneOffset" and I have tried many different ways. When I do this in R: highChart$global(timezoneOffset=-300) I do not get any warning or error, but it's not working. Thanks a lot for the help! Here is a piece of code: library(rCharts) highChart <- Highcharts$new() highChart$global(timezoneOffset=-300) highChart$chart

How to produce scatterplot with a factor as y in highcharter?

我是研究僧i 提交于 2019-12-01 11:46:18
Problem: I would like to produce a scatter plot with highcharter::hchart , where y is a factor , and x is a date . Apparently, highcharter::hchart "scatter" does not accept factor variables as y. Is there any workaround? Or is "scatter" just the wrong charttype? (Comment: I know ggplotly would be a good alternative, but I actually need a highcharter solution) Example: Let's suppose I want to produce a timeline of publications by type . I want a scatterplot with d$type (=y-axis) and d$date (=x-axis) and the highcharter tooltip should show me d$title , d$type and d$date (properly formatted).