multiple series in Highcharter R stacked barchart
<p>After going through the highcharter package documentation, visiting JBKunst his website, and looking into list.parse2(), I still can not solve the problem. Problem is as follows: Looking to chart multiple series from a data.frame into a stacked barchart, series can be anywhere from 10 - 30 series. For now the series have been defined as below, but clearly there has to be an easier way, for example passing a list or melted data.frame to the function hc_series similar as what can be done with ggplot2. </p>

<p>Below the code with dummy data</p>

<pre><code>mydata &lt;- data.frame(A=runif(1:10),
               B=runif(1:10),
               C=runif(1:10))

highchart() %&gt;% 
hc_chart(type = "column") %&gt;% 
hc_title(text = "MyGraph") %&gt;% 
hc_yAxis(title = list(text = "Weights")) %&gt;% 
hc_plotOptions(column = list(
   dataLabels = list(enabled = FALSE),
   stacking = "normal",
   enableMouseTracking = FALSE)
   ) %&gt;% 
hc_series(list(name="A",data=mydata$A),
        list(name="B",data=mydata$B),
        list(name="C",data=mydata$C))
</code></pre>

<p>Which produces this chart: 
<a href="https://i.stack.imgur.com/hoTdr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hoTdr.png" alt="enter image description here"></a></p>