superman66 / vue-highcharts

The Component of Vue 2.x for highcharts
https://codesandbox.io/s/jjyqvv0k13
MIT License
115 stars 48 forks source link

Setting drill down in option and do mergeOption not working #36

Closed HarisHashim closed 6 years ago

HarisHashim commented 6 years ago

I know that drill down is working because it works if I set directly in myOptions inside template

<template>
      <vue-highcharts :highcharts="Highcharts" :options="myOptions" ref="vueHighcharts"/>
</template>```
// in script
data() {
    return {
      // ...
      myOptions: {
          // ...
      }
   }
}

However, I want to set drill down dynamically by setting myOptions and mergeOption. And this does not work!

this.myOptions.drilldown.series = this.chartData.drilldown.series;
this.hichart.mergeOption(this.options);

Any guide how to do this?

Thanks in advance Haris

superman66 commented 6 years ago

Can you provide any online code? Or you can fork Vue-highcharts Demo

HarisHashim commented 6 years ago

Sorry, was sidetracked by other stuff. Will get back once I got something working with the demo fork!

HarisHashim commented 6 years ago

Hi again @superman66 , took me so long to get back to you.

It turns out mergeOption function is working when I modify the vue-highcharts-demo code given by you.

Since I have problem with sandbox link that you share with me. I put my testing code in Github. My test code is in LoadModuleChart.

I add 2 button to change the series and drilldown serries. The functions to change is in methods

Thanks and I am going to close this issue. Must be something wrong with my code since it works in the demo.