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

Fix chart tooltip incorrect order #79

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Conversation

JT-39
Copy link
Contributor

@JT-39 JT-39 commented Jan 28, 2025

Pull request overview

This is to fix issue #74 where the line chart tooltip is not in the correct order.

Pull request checklist

Please check if your PR fulfills the following:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Tests have been run locally and are passing (shinytest2::test_app())
  • Code is styled according to tidyverse styling (checked locally with styler::style_dir() and lintr::lint_dir())

What is the current behaviour?

When the tooltip contains values which have a suffix (such as million or billion) this is can currently lead to an incorrect order of the tooltip (for line charts). This is due to the order taking the raw number value of the formatted number (and not taking into account the suffix).

What is the new behaviour?

This issue has now been fixed, the tooltip is ordered by the raw value before the formatting.

Anything else

I had to update {chromote} to get a number of the tests to work due to an error that was appearing:

⠏ |          0 | UI-01-basic_load                                    
Error in with_random_port(launch_chrome_impl, path = path, args = args) : 
  Cannot find an available port. Please try again.
Caused by error in `startup()`:
! Failed to start chrome. Error:
Old Headless mode has been removed from the Chrome binary. Please use the new Headless mode (https://developer.chrome.com/docs/chromium/new-headless) or the chrome-headless-shell which is a standalone implementation of the old Headless mode (https://developer.chrome.com/blog/chrome-headless-shell).

I also had to run the line:

options(chromote.headless = "new")

This came from a GitHub issue on the chromote repo- Chrome v132 no longer supports old headless mode #187

JT-39 added 2 commits January 28, 2025 14:34
…ome. Error:

Old Headless mode has been removed from the Chrome binary. Please use the new Headless mode." - May need to set environment variable with "options(chromote.headless = "new")"
@JT-39 JT-39 linked an issue Jan 28, 2025 that may be closed by this pull request
@JT-39 JT-39 requested a review from ArthurMurrell January 28, 2025 14:54
@JT-39 JT-39 merged commit e64ff41 into main Jan 31, 2025
3 checks passed
@JT-39 JT-39 deleted the fix-chart-tooltip-incorrect-order branch January 31, 2025 09:31
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.

Bug: Line chart tooltip not in numerical order for large values
2 participants