Closed dpgalloway closed 6 years ago
this.$refs.highchart
this Highchart Instance is correct?
hey @dpgalloway, I found it works below: in Javascript, you can use like normal Highcharts usage,
Highcharts.setOptions({
lang: {
drillUpText: 'back',
},
})
in HTML: you should add Highcharts
as props
<vue-highcharts :Highcharts="Highcharts" :options="options" ></vue-highcharts>
@superman66 Thank you for the answer, but I couldn't get that to work (error that Highcharts is undefined). I ended up just using vanilla Highcharts since my needs are fairly simple and don't need to rely on Vue. However, if you have a snippet of working code using the method you described above, others may find it useful (could also add to documentation).
you can see this demo LoadModuleChart.vue
@dpgalloway hi, has your problem been solved?
How can I apply global highcharts methods? For example, I'd like to set the thousands separator to comma, which in the Highcharts documentation is done by doing this (http://jsfiddle.net/highcharts/eeDnv/):
I've tried this.$refs.highchart.delegateMethod('setOptions')... but that gives an error (can't apply undefined). I've also tried this.$refs.highchart.chart.setOptions()... but that also gives an error that setOptions is not a function.