Skip to content

fix: wrong tooltip in radar chart in firefox #990

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

Merged
merged 4 commits into from
Jul 15, 2021

Conversation

jyothishjose6190
Copy link
Contributor

Description

In Firefox alone, wrong tooltip was shown for radar chart

Testing

Run all test cases using npm run lint && npm run test

Checklist:

  • My changes generate no new warnings

@jyothishjose6190 jyothishjose6190 requested a review from a team as a code owner July 14, 2021 10:19
@@ -15,7 +15,7 @@ export class RadialDataLookupStrategy {

public constructor(private readonly allSeries: RadarSeries[], radialAxisData: RadarAxisData[]) {
this.radialBisector = bisector(axisData => axisData.axisRadian);
this.radialAxisData = clone(radialAxisData);
this.radialAxisData = clone(radialAxisData.sort(axisData => axisData.axisRadian));
Copy link
Contributor

Choose a reason for hiding this comment

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

please sort the cloned array instead of the argument

Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, if this data is not sorted why is this not an issue in other browsers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is sorted in other browsers like chrome and safari.
Without the fix, in chrome radialAxisData, is sorted by axisRadian
Screenshot 2021-07-15 at 10 51 29 AM

The same code in firefox returns radialAxisData is not sorted
Screenshot 2021-07-15 at 10 52 19 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

oh strange - thanks for explaining!

@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #990 (6ad2880) into main (d3847c6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #990   +/-   ##
=======================================
  Coverage   85.07%   85.07%           
=======================================
  Files         814      814           
  Lines       16773    16773           
  Branches     2169     2169           
=======================================
  Hits        14269    14269           
  Misses       2473     2473           
  Partials       31       31           
Impacted Files Coverage Δ
...nents/radar/tooltip/radial-data-lookup-strategy.ts 91.89% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3847c6...6ad2880. Read the comment docs.

@aaron-steinfeld
Copy link
Contributor

Welcome and thanks @jyothishjose6190 !

@aaron-steinfeld aaron-steinfeld merged commit 5b795c2 into hypertrace:main Jul 15, 2021
@github-actions
Copy link

Unit Test Results

    4 files  ±0  259 suites  ±0   14m 50s ⏱️ +2s
941 tests ±0  941 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
947 runs  ±0  947 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 5b795c2. ± Comparison against base commit d3847c6.

@jyothishjose6190
Copy link
Contributor Author

Welcome and thanks @jyothishjose6190 !

thank you

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.

3 participants