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

Highcharts/12 hover label highlight #12

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

MarkusBarstad
Copy link
Contributor

No description provided.

@MarkusBarstad MarkusBarstad self-assigned this Sep 6, 2022
@MarkusBarstad
Copy link
Contributor Author

I suspect that having a seperate variable outside of the chart to hold the highlighted category, might not be ideal

  • Is there a way to keep a variable for the highlighted category internally? I tried setting a variable in the load-event, and while it was visible from the formatter-callback-func, its data was not as easy to update using the mouseOut/mouseOver-functions
  • If you guys want me to use no custom variables, may i use a series for holding the category-data instead of using the categories-object?

Feel free to tell me no x)! I realize i could flag points as selected in the mouseOver/mouseOut-callbacks, and i suspect that using that there is a way ;)

Copy link

@K009 K009 left a comment

Choose a reason for hiding this comment

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

Overall the task is done correctly. I really like your solution because it's short, efficient and you're using highcharts functions. However, it has one drawback that I wrote down below. Please take a look. :)

Besides that you can only remove some unnecessary code like removing the titles of the chart, axes, etc, the categories should also be 'Jan, Feb...' not years, but that's of course not the case with this task.

@MarkusBarstad
Copy link
Contributor Author

MarkusBarstad commented Sep 23, 2022

Hey, K009!

I looked closer at the redraw-function and realized i could disable animation only for the single redraw-call instead of disabling animation in general for the whole chart x)

EDIT: Oh, and sorry, I will fix the category-text and stuff as well to fit the screenshot provided!

@MarkusBarstad
Copy link
Contributor Author

  • Months now instead of years
  • titles are default as in the screenshot
  • series have the city-names now :)

Copy link

@K009 K009 left a comment

Choose a reason for hiding this comment

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

Great Markus, now it looks much better. Thanks for that 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants