Closed progitect closed 3 months ago
thanks for the PR :)
before the legends were fully loaded/created.
would you mind making a jsfiddle similar to https://jsfiddle.net/0bvks7cw/1/ that reproduces this issue?
i think there might be a better way to fix this but i'll need to verify that it works.
Thanks for your input. I will try to reproduce it in a jsfiddle, but I do not have the time at this moment to create it. Will update when I have reproduced it.
After trying to reproduce this issue in a jsfiddle, it turned out that the problem was only occurring when syncing to a timeline chart (https://leeoniya.github.io/uPlot/demos/timeline-discrete.html) like the 'Merged same consecutive states' one. I have fixed it with some extra code in the timeline plug-in. Basically I added some code to force that the setCursor
hook is only executed when all series are drawn.
As the isssue is solved I will close this PR,
This pull request fixes a null error in the syncLegend function. This error would occur when syncLegend was called before the legends were fully loaded/created.