superman66 / vue-highcharts

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

Annotations module not working #34

Closed ricardomariz closed 6 years ago

ricardomariz commented 6 years ago

I'm trying to use annotations and it doesn't seems to work properly.

I'm loading the module like this:

import Annotation from '../../node_modules/highcharts/modules/annotations.js' Annotation(Highcharts)

And after that adding some data throught the options:

annotations: [{ labels: [{ point: { x: 5.5, y: 30, xAxis: 0, yAxis: 0 }, text: 'Label' }, { point: { x: 18, xAxis: 0, y: 90, yAxis: 0 }, text: 'Aaaaaaa' }], labelOptions: { backgroundColor: 'rgba(255, 255, 255, 0.5)', borderColor: 'silver' } }],

But when the graph loads, it doesn't show any annotations, just a string "[object Object]" on the top-left corner (as shown in the link).

https://imgur.com/a/Kbs6R

I also tried to add highchartMore module but still not working.

ricardomariz commented 6 years ago

I was using highcharts 5.x instead of highcharts 6.0. Now it's working.