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

Indicators

boriswexler opened this issue · comments

How do you include indicators? I understand I need the highstock-release module, which I've installed via npm, but when I try to add one I get an error #17 (series type not found).

I am using ES6:

import Highstock from 'react-highcharts/ReactHighstock.src'

Do I need to modify that statement or add to it?

Thanks

Thank you! This was very helpful, but I am getting a different error now:

TypeError: c is not a function
    at /Users/borisw/Code/coinopinions-fe2/node_modules/highcharts/indicators/indicators.js:10:187
    at /Users/borisw/Code/coinopinions-fe2/node_modules/highcharts/indicators/indicators.js:12:396

@boriswexler Check your configuration carefully! if you simplify your example and show it https://stackblitz.com, I can see the problem.

@ilyjs I tried it outside of my project and it runs fine. I believe it has something to do with the fact that my project is next.js based. Have you ever done this with next.js? The basic chart works fine - adding the indicator produces this error. Thanks a lot for the help.

@boriswexler
I did not use next.js . As far as I understand next.js is used for server side rendering.
Make a repository with a simple example. I will check and tell you exactly how to fix it.

@ilyjs I figured it out. It was trying to do the imports server side which was failing. I forced them to be client side and it worked. Many thanks for your help!