kirjs / react-highcharts

React wrapper for Highcharts library

Home Page:http://kirjs.github.io/react-highcharts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotations not working

revisionfour opened this issue · comments

I am having an issue with annotations in my project.

I have created this example which shows annotations working in a sandbox environment. It appears it will only work with highcharts version 6.0.6.
https://codesandbox.io/s/1rq3vl1vr4

However I am having an issue in my project using the same versions

In my project I have the lines
import Annotations from 'highcharts/modules/annotations';
import ReactHighcharts from "react-highcharts";

Annotations(ReactHighcharts.Highcharts);

I'm getting this error
Annotations(ReactHighcharts.Highcharts);
^
2019-01-31 15:52:41 [ERROR] {d10eb595-5caa-4c56-9d05-7f3aded9019c} TypeError: Cannot read property 'prototype' of undefined

In my package.json I'm using
"highcharts": "6.0.6",
"react-highcharts": "16.0.2",

Any ideas?

Please help us by reproducing your issue here:
https://stackblitz.com/fork/react-highcharts-demo
(codesandbox would also work)