score:0
Accepted answer
i needed to rebuild a little bit your code. you need to use chart.addsingleseriesasdrilldown() method in chart.events.drilldown event. this is your whole code:
hc <- highchart() %>%
hc_chart(
type = "column",
events = list(
drilldown = js(
"function(e) {
if (!e.seriesoptions) {
var chart = this;
chart.addsingleseriesasdrilldown(e.point, {
color: highcharts.getoptions().colors[0],
name: 'completed',
data: [
['job a1', 40],
['job b1', 35]
]
});
chart.addsingleseriesasdrilldown(e.point, {
color: highcharts.getoptions().colors[1],
name: 'no progress',
data: [
['job a1', 60],
['job b1', 65]
]
});
chart.applydrilldown();
}
}"
)
)
) %>%
hc_title(text = "job ratio") %>%
hc_xaxis(type = "category") %>%
hc_plotoptions(series = list(stacking = "normal")) %>%
hc_yaxis(max = 100) %>%
hc_add_series(
name = "completed",
data = list(
list(name = "job a", y = 40, drilldown = t),
list(name = "job b", y = 35, drilldown = t)
)
) %>%
hc_add_series(
name = "no progress",
data = list(
list(name = "job a", y = 60),
list(name = "job b", y = 65)
)
) %>%
hc_drilldown(
series = list()
)
hc
and here you can take a look at the pure js implementation: https://jsfiddle.net/blacklabel/m089w4yh
api: https://api.highcharts.com/highcharts/chart.events.drilldown
Source: stackoverflow.com
Related Query
- R Package Highcharter: How do I drilldown to multiple series stacked column graph?
- How could you supply multiple series to a line chart in R shiny using highcharter package and without hardcoding the series?
- How to make stacked column graph to show total data value on top
- multiple series in Highcharter R stacked barchart
- Need stacked column chart with multiple series
- How to hide empty column in column hightcharts with multiple series
- How to show Legends for all the series data in stacked column chart Highcharts?
- how to plot multiple time series in the same graph with customized x axis
- How to set column width for columnRange chart with multiple series
- Multiple time series in stacked column chart
- How to set up drilldown feature for multiple boxplot series in highcharter?
- Drilldown to multiple series from different groups - Highcharter (in R)
- R - Highcharter: Drilldown on stacked column graph
- How to drilldown a stacked column highchart to show all stacks instead of clicked
- How to maintain column width with multiple series in highcharts?
- How to have multiple highcharts with different series data in vuejs without repeating code
- Column based Highchart drilldown series assign color code to each column
- Highcharts: Stacked area drilldown to multiple series
- How to add different series data for each categories in Stacked Column chart in Highcharts?
- How to Create a Stacked Column Chart with Dynamic Series in Highcharts
- How to create Stacked and Grouped column graph in an inner drilldown?
- Highcharts Stacked column drill down not working?> How to set drill down series for my scenario?
- How to prevent my stacked series from being in reverse order?
- How to get multiple series data in tooltip highcharts?
- Drilldown in highmaps - how to remove a series
- How to get multiple data series into Highcharts
- Highcharts.js: how can stacked area graph animations be smooth?
- How to set dataLabel Format and axis label angle in R highcharter package
- How do I do a stacked bar chart as a drilldown to a stacked bar chart?
- Single series drilldown to multiple series Highcharts
More Query from same tag
- Does Angular 4 supports highcharts-angular (Highcharts wrapper for Angular)?
- Highcharts add a legend for marker colors
- Highcharts: incorrect column placement with linked series?
- Have single color for all words in highcharts word cloud
- How to add custom map and custom data to Highmaps?
- Getting the complete XML source out of an XML DOM object
- Highcharts legend labels go outside canvas
- Highcharts : show time with 30 second interval
- How to calculate the weights in a Sankey chart?
- Passing data to highcharts from javascript array or variable
- TypeError: highcharts is not a function
- Highcharts : Put data labels legend inside columns
- DrillDown in multiple line graphs
- Highcharts - Highstock chart showing double line on hovering data points to show tooltip
- Highcharts Highmaps zoom to latitude longitude
- Highcharts with multiple series from JSON
- how to show the little circle in tooltip of highcharts
- Highcharts: Wind Rose chart with JSON data
- Highcharts X-range. Columns of maximum height
- angularjs and highcharts, labels not shown unless I hover over the data points
- Showing multiple Tooltips in highcharts simultaneously
- highcharts-export-clientside Unsupported export format
- spark-highcharts export to file (png or pdf)
- Torn off point markers on Navigator highcharts
- Can I change series array completely in highcharts
- How to customize graph title and subtitle
- highchart not shown data graph
- Highchart java script getting filled
- Highcharts - line between two categories
- converting html to haml