-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Gantt Chart) Cannot read property 'isCartesian' of null #200
Comments
Without any code to replicate the issue it's difficult to say. At a guess this is likely an issue with the scope of I.e. this will not work, as the arrow function binds the scope of your mouseOver handler to be the React component render () {
const plotOptions = {
series: {
point: {
events: { mouseOver: () => { // Do something } }
}
}
}
return (
<HighchartsChart plotOptions={plotOptions}> Instead try this render () {
const plotOptions = {
series: {
point: {
events: { mouseOver: function () { // Not an arrow function, "this" scope unchanged } }
}
}
}
return (
<HighchartsChart plotOptions={plotOptions}> |
This is the original issue I solved with the allowChartUpdate property: highcharts/highcharts-react#85 And this is an example showing what I'm trying to do, sadly without reproducing my problem: In this example I used the tooltip positions, now I've moved on to using Popper.js with an anchor element. Either way I need to set some properties in the state. Even if I didn't use an arrow function, wouldn't I have to bind the function to this anyways?
thanks |
I notice that you are using a Gantt chart in that example, React JSX Highcharts does not currently support Gantt charts (see #174). I'm not sure I can really offer much help on this issue until it does. |
I'm using the same event and having a few difficulties with it as well. |
Bug or Feature Request?
Bug
Description
This error happens when I'm calling this.setState from the plotOption > series >point > events > mouseOver event.
I'm not able to reproduce the error, but I've solved it in another chart where I'm using highcharts-react-official. I'm stopping the chart from updating while setting the state using a property called allowChartUpdate.
Is there anything equivalent to allowChartUpdate in react-jsx-highcharts?
Thanks!
Versions
The text was updated successfully, but these errors were encountered: