-
Hey guys! First of all, i'm loving these charts, they are very nice looking and smooth, props to the creators! Secondly, i've been running into some issues, is there any problems when validating dates? i got an issue where the console indicates chart.value is null when it really isn't, in fact, if i remove updateOptions() the chart will render just fine with all the data i need, this is happening in just one chart that i happen to be validating some dates, my other charts are all working fine, some of them even have the same date validations i'm using in the problematic chart, could this be a db related issue? Problem is happening in this section:
Has anyone ever stumbled into a similar problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Found out a couple of things after a while. val.forEach((l)... statement has to wrap the entirety of the watcher in order for chart to be not null, everything works fine if this page is the first to be opened, and if its opened subsequently and you refresh it, it will render with no problems whatsoever, this chart follows the same pattern i've used in 4 other charts, it is almost entirely equal to them, just variable names change, i'll keep fiddling with it, hopefully i find a solution soon, if i do, i'll post it here for the sake of others that might run into a similar issue |
Beta Was this translation helpful? Give feedback.
-
I've found the solution, this chart was initialized before the other charts, and when you would leave the page, it wasn't destroyed properly, so when you tried to access it again, it would try to render it again over an existing one causing its value to be null, to solve this, simply add a bool to check if it is really loaded or not, like so:
|
Beta Was this translation helpful? Give feedback.
I've found the solution, this chart was initialized before the other charts, and when you would leave the page, it wasn't destroyed properly, so when you tried to access it again, it would try to render it again over an existing one causing its value to be null, to solve this, simply add a bool to check if it is really loaded or not, like so: