title: highcharter graph with 2 groups in r
body: <p>I'm trying to create a graph with 2 measures(Sales and Pollution) for 3 groups (BMW, AUDI and VW) for 10 years. So I need to plot 6 lines. I would like the lines for each car be the same but the pollution should be dashed. This is the dataset:
  library(data.table)
  library(highcharter)</p>
  
  <pre><code>mydata&lt;-data.table(year=rep(2001:2015,3),car=c(rep('BMW',15),rep('VW',15),rep('AUDI',15)),
                     sales=c(50000*rnorm(n = 15,mean = 1,sd = .8),30000*rnorm(n = 15,mean = 1,sd = .6),60000*rnorm(n = 15,mean = 1,sd = .2)),
                     polution=c(1*rnorm(n = 15,mean = 1,sd = .8),5*rnorm(n = 15,mean = 1,sd = .6),2*rnorm(n = 15,mean = 1,sd = .2)))
  </code></pre>
  
  <p>It's easy to plot the group chart for only 1 measure:</p>
  
  <pre><code>hchart(mydata,'line',x=year,y=sales,group=car)
  </code></pre>
  
  <p>And I'm also able to plot both measures in one plot, but then I'm not able to group the car as group is not in <code>hc_add_series()</code>:</p>
  
  <pre><code>highchart() %&gt;%
    hc_xAxis(title=list('Exercise'),categories=mydata$year) %&gt;%
    hc_yAxis_multiples(list(
      title=list(text="MM $"),
      align= "right",
      showFirstLabel=FALSE,
      showLastLabel=FALSE,
      opposite=FALSE
    ),
    list(
      title=list(text="Polution"),
      align= "left",
      showFirstLabel=FALSE,
      showLastLabel=FALSE,
      opposite=T,
      labels = list(format = "{value}%")
    )) %&gt;%
    hc_add_series(name="Sales",type='line',
                  data=mydata$sales,yAxis=0) %&gt;%
    hc_add_series(name="polution",type='line',
                  data=mydata$polution,yAxis=1,dashStyle='longdash')
  </code></pre>
  
  <p>Is there a way to achieve this in <code>highcharter</code>?
  Thanks.</p>