Skip to content
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

bugfix/19078-proximate-legend-enabling #19153

Merged
merged 3 commits into from Jun 15, 2023

Conversation

jszuminski
Copy link
Contributor

Fixed #19078, proximate legend did not work after updating the legend.enabled property.

Demo of the problem: https://jsfiddle.net/BlackLabel/1cmx87k9/
Demo after fix: https://jsfiddle.net/BlackLabel/wftjvga3/

Source of the problem:

  • proximatePositions() was called even when legend.enabled = false which caused multiple errors
  • proximatePositions() and positionItems() functions were called only in the initial chart render, not after updating

@jszuminski jszuminski self-assigned this Jun 14, 2023
@highsoft-bot
Copy link
Collaborator

highsoft-bot commented Jun 14, 2023

File size comparison

Sizes for compiled+gzipped (bold) and compiled files.

master candidate difference
highcharts.js 99.4 kB
281.4 kB
99.4 kB
281.4 kB
11 B
22 B
highstock.js 132.7 kB
383.0 kB
132.7 kB
383.0 kB
5 B
22 B
highmaps.js 125.4 kB
360.0 kB
125.4 kB
360.0 kB
-1 B
22 B
highcharts-gantt.js 134.8 kB
388.0 kB
134.8 kB
388.0 kB
12 B
22 B

@highsoft-bot
Copy link
Collaborator

Visual test results - No difference found

Copy link
Member

@hubertkozik hubertkozik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment on the current solution below. Also, please add a unit test to cover this case.

ts/Core/Legend/Legend.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hubertkozik hubertkozik self-requested a review June 15, 2023 06:26
@TorsteinHonsi TorsteinHonsi merged commit 24f486d into master Jun 15, 2023
9 checks passed
@highsoft-bot highsoft-bot added this to the Next milestone Jun 15, 2023
@TorsteinHonsi TorsteinHonsi deleted the bugfix/19078-proximate-legend-enabling branch June 15, 2023 06:26
@pawellysy pawellysy added Product: Highcharts Dashboards Changelog: Bugfix Use on PR to add description as a bugfix in the generated changelog. and removed Product: Highcharts Dashboards labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Use on PR to add description as a bugfix in the generated changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Legend with layout 'proximate' issues with enabling/disabling
5 participants