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
Multiple redraw events fired during annotations line drawing #17582
Comments
Workaround: Highcharts.Annotation.prototype.update = function(userOptions, redraw) {
var chart = this.chart,
labelsAndShapes = this.getLabelsAndShapesOptions(this.userOptions, userOptions),
userOptionsIndex = chart.annotations.indexOf(this),
options = Highcharts.merge(true, this.userOptions, userOptions);
options.labels = labelsAndShapes.labels;
options.shapes = labelsAndShapes.shapes;
this.destroy();
this.constructor(chart, options);
// Update options in chart options, used in exporting (#9767):
chart.options.annotations[userOptionsIndex] = options;
this.isUpdating = true;
if (Highcharts.pick(redraw, true)) {
chart.drawAnnotations();
}
Highcharts.fireEvent(this, 'afterUpdate');
this.isUpdating = false;
}; Internal note:
|
@pawelfus Many ways to optimize a11y descriptions, as you say we could keep track of whether or not changes have been made. Also with data grouping I would have thought it was already pretty fast, so we might want to look into which parts specifically are taking long. |
Description of the feature
Function responsible for creating an annotation could be improved.
For example, redraw event is fired on every mouse move during line drawing which is very performance heavy (the same issue is not happening when updating or dragging a line).
Is there a point to redraw the whole chart during that?
Library related to the feature
Highcharts Stock with Stock Tools GUI
Proof of Concept/Live example for the feature
DEMO: https://jsfiddle.net/BlackLabel/rdLu86z4/
Also, watch the console while updating the same line.
You can vote for this feature by adding a thumbs-up reaction to this post.
The text was updated successfully, but these errors were encountered: