Looking to utilize highchart to create a chart with columns stacked within each other for different countries.
https://i.sstatic.net/2p1uM.png
I want the smaller column to be nested inside the larger one for each country.
Any suggestions on how I can achieve this effect?
This is the code I currently have:
library(tidyverse)
library(gapminder)
library(highcharter)
gapminder::gapminder %>%
filter(year >= 1990,country %in% c('Chile','Argentina'))%>%
hchart(
type = 'column',
hcaes(x = year, y = gdpPercap, group = country),
visible = TRUE,
showInLegend = TRUE,
name = "",
zIndex = 9999999,
zoneAxis = 'x',
color = 'blue'
) %>%
hc_subtitle(text = "") %>%
hc_legend(enabled = FALSE) %>%
hc_xAxis(enabled = FALSE,title = FALSE) %>%
hc_yAxis(enabled = FALSE,title = FALSE,
labels = list(enabled = FALSE)) %>%
hc_plotOptions(
column = list(stacking = NULL,pointWidth = 10)
)
I am looking for guidance on how to manipulate the positions of the columns in the chart.