r-highcharter

how to create two independent drill down plot using Highcharter?

China☆狼群 提交于 2019-12-27 15:57:33
问题 I'm working on shiny app that contains two drill down charts, both read from same data file the only difference is the first chart excute summation, while the second one gets averages, the issue is whatever the change I make both charts still conflicting , here is the used code cate<-c("Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","Furniture","drinks","drinks","groceries","groceries","groceries","dairy",

Highcharter map with drill-down ability

我们两清 提交于 2019-12-24 20:18:27
问题 I have a dataframe with US States and their counties like the one below: State<-c("Alabama","Alabama","Alaska","Alaska") StateCode<-c("AL","AL","AK","AK") County<-c("AUTAUGA","BALDWIN","ANCHORAGE","BETHEL") CountyCode<-c("AL001","AL003","AK020","AK050") Murder<-c(5,6,7,8) d<-data.frame(State,StateCode,County,CountyCode, Num) My goal is to create a State-County drill-down map like this highchart map. After finding the summary of Murder from every State I created a dataframe like the one below:

Variwide charts in Highcharter

混江龙づ霸主 提交于 2019-12-24 19:33:49
问题 I would like to create a chart like this in Highcharter to use in R. Ideally, what I would like to do is a bar chart where the width of the bar is the spread over the amount of days for which the event has happened. I have tried using "pointWidth", however, I need the bar width to be variable depending on the length of the event. Here is the dataframe I am trying to plot: df <- data.frame(event = c("wedding", "party", "concert"), start_date = as.Date(c("2017-10-01", "2017-11-01", "2017-11-20"

Additional data to highcharter tooltip

孤街浪徒 提交于 2019-12-24 09:14:26
问题 I have a line chart in highcharter that I would like to add additional information in the tooltip to. Data and code is as follows: library("dplyr") library("highcharter") data<- data.frame(Company = c("A", "A", "A", "B", "B", "B"), Year = c(1,2,3,1,2,3), Value1 = c(100, 150, 170, 160, 150, 180), Value2 = c(3, 1, 7, 6, 5, 4)) data<- data %>% group_by(name = Company) %>% do(data = .$Value1, Value2 = .$Value2) series<- list_parse(data) highchart()%>% hc_chart(type="line")%>% hc_add_series_list

highcharter integration in R Shiny “html template”-based application

别来无恙 提交于 2019-12-24 01:23:46
问题 CONTEXT I want to create a R Shiny dashboard using advanced UI, based on html template. The UI is thus built in pure HTML, and I'm using a bootstrap 4 free template as a starting point. ISSUE While using highcharter and its Shiny integration functions works fine with super basic HTML files (same as in the above tutorial), charts do not display once I use a bootstrap dashboard theme. WHAT I HAVE TRIED Several bootstrap templates: SB Admin 2 Gentelella REPRODUCIBLE EXAMPLE Sharing a

highcharter: Highlight points in a group

一个人想着一个人 提交于 2019-12-23 12:20:56
问题 When using highcharter for interactive plots, how can I specify that datapoints in a group must highlight together? library(highcharter) library(dplyr) library(tidyr) dfr <- data.frame(sample=c("A","B","C","D"),part=c(2,3,4,6),cat=c(5,7,3,3)) dfr1 <- dfr %>% tidyr::gather(key=metric,value=value,-sample) dfr1 sample metric value 1 A part 2 2 B part 3 3 C part 4 4 D part 6 5 A cat 5 6 B cat 7 7 C cat 3 8 D cat 3 dfr1 %>% hchart(.,"scatter",hcaes(x=metric,y=value,group=factor(sample))) %>% hc

R Package Highcharter: How do I drilldown to multiple series stacked column graph?

独自空忆成欢 提交于 2019-12-23 05:10:42
问题 I want to drilldown to multiple series. How do I change the x axis categories after drilldown and still maintain my series? hc <- highchart() %>% hc_chart(type = "column") %>% hc_title(text = "Job Ratio") %>% hc_xAxis(categories = c("Job A", "Job B")) %>% hc_plotOptions(series = list(stacking = "normal")) %>% hc_yAxis(max = 100) %>% hc_add_series(name = "Completed", data = list(list(y = 40, drilldown = "job-a"), list(y = 35, drilldown = "job-a"))) %>% hc_add_series(name = "No progress", data

Drill Down of grouped column chart using r-highcharter library

感情迁移 提交于 2019-12-23 04:46:02
问题 I am struggling in adding one level drilldown in my grouped column chart made using highcharter. To explain, I am taking using the "vaccines" dataset available in highcharter library : My code (similar) that creates the grouped column chart : library (highcharter) library(dplyr) df <- na.omit(vaccines[vaccines$year %in% c("1928", "1929"),]) df <- ddply(df, c("state", "year"), summarise, count = sum(count)) hc <- hchart(df, type = "column", hcaes(x = state, y = count, group = year)) %>% hc

R Highcharter: dynamic drilldown in Shiny on the fly

自古美人都是妖i 提交于 2019-12-20 07:35:06
问题 I am trying to create a multi-layer drilldown graph using highcharter with dynamic data in shiny . With the help of the SO Community (shoutout to @K. Rohde) was able to figure it out by looping through all possible drilldowns. My actual shiny application will have hundreds off possible drilldowns and I don't want to add this extra time to the application but rather have the drilldown be created on the fly using addSingleSeriesAsDrilldown . Unsure of how to use it in R though. Below is the

Highcharter stacked column groupings not using hchart()

≯℡__Kan透↙ 提交于 2019-12-18 09:26:23
问题 I'm trying to create a stacked bar chart with groupings using Highcharter, and need to create it without using the hchart() function. I have the following code ( hchart() portion works). data <- data.frame( building = c("Building A", "Building A", "Building B", "Building B"), type = c("Rent", "Owned"), measure = c(100, 35, 124, 150), measure_target = c(95, 20, 122, 145) ) # This works hchart(data, "column", hcaes(x = "building", y = "measure", group = "type")) %>% hc_plotOptions(column = list