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

🐛[xy-chart] fix top/left tooltip offset #140

Merged
merged 4 commits into from
Oct 9, 2018

Conversation

williaster
Copy link
Owner

@williaster williaster commented Oct 8, 2018

🐛 Bug Fix

This fixes #137 where tooltips have incorrect offsets when using <YAxis orientation="left" /> or <XAxis orientation="top" />.

This bug occurs specifically with <AreaSeries /> and <LineSeries />, and the data point that is highlighted in these instances is approximately margin.left to the right of the point you expect it to be (for <YAxis orientation="left" />) or margin.top below the point you expect it to be (for <XAxis orientation="top" />).

cc @jhofstede

@williaster williaster force-pushed the chris--xychart-margin-tooltip-offset branch from 4bec44e to f4580b7 Compare October 8, 2018 22:56
@codecov
Copy link

codecov bot commented Oct 8, 2018

Codecov Report

Merging #140 into master will increase coverage by 0.03%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage   79.76%   79.79%   +0.03%     
==========================================
  Files         109      109              
  Lines        2382     2386       +4     
  Branches      547      547              
==========================================
+ Hits         1900     1904       +4     
  Misses        310      310              
  Partials      172      172
Impacted Files Coverage Δ
packages/xy-chart/src/selection/Brush.jsx 65.67% <ø> (ø) ⬆️
packages/xy-chart/src/series/StackedAreaSeries.jsx 97.29% <ø> (ø) ⬆️
packages/sparkline/src/chart/Sparkline.jsx 82.92% <ø> (ø) ⬆️
packages/sparkline/src/utils/findClosestDatum.js 10% <0%> (ø) ⬆️
packages/xy-chart/src/chart/XYChart.jsx 68.29% <0%> (ø) ⬆️
packages/xy-chart/src/chart/Voronoi.jsx 88% <100%> (ø) ⬆️
packages/sparkline/src/series/LineSeries.jsx 88.23% <100%> (ø) ⬆️
packages/shared/src/enhancer/WithTooltip.jsx 80% <100%> (ø) ⬆️
packages/xy-chart/src/utils/propShapes.js 100% <100%> (ø) ⬆️
packages/xy-chart/src/utils/findClosestDatums.js 93.33% <100%> (+0.47%) ⬆️
... and 4 more

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 58a12bc...61c23eb. Read the comment docs.

@williaster
Copy link
Owner Author

build is somehow broken (I think due to babel minify), still debugging.

@williaster
Copy link
Owner Author

gonna merge this and fix the build separately.

@williaster williaster merged commit 0b52d05 into master Oct 9, 2018
@williaster williaster deleted the chris--xychart-margin-tooltip-offset branch October 9, 2018 21:03
@williaster williaster added this to the v0.0.70 milestone Nov 15, 2018
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.

Unexplainable tooltip offset in XY-Chart when orientation of YAxis is set to left.
1 participant