Closed envex closed 1 week ago
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
polaris-viz-core-cjs | 61.64 KB (+0.03% 🔺) | 1.3 s (+0.03% 🔺) | 1.2 s (+2.96% 🔺) | 2.5 s |
polaris-viz-cjs | 223.17 KB (+0.27% 🔺) | 4.5 s (+0.27% 🔺) | 1.8 s (-13.04% 🔽) | 6.3 s |
polaris-viz-esm | 180.6 KB (+0.08% 🔺) | 3.7 s (+0.08% 🔺) | 1.4 s (-11.11% 🔽) | 5.1 s |
polaris-viz-css | 5.51 KB (+0.65% 🔺) | 111 ms (+0.65% 🔺) | 680 ms (+67.7% 🔺) | 790 ms |
polaris-viz-esnext | 187.28 KB (+0.09% 🔺) | 3.8 s (+0.09% 🔺) | 1.3 s (-12.36% 🔽) | 5.1 s |
What does this implement/fix?
When on a touch device we want the
LineChart
tooltip to always display above the chart instead of under the users finger.Also as part of this PR is a the removal of the
getAlteredPosition
andgetPosition
props from theTooltipWrapper
component.We're now passing a
chartType
to theTooltipWrapper
that will determine what special positioning needs to be done for each chart type.This should keep all the tooltip logic in one central place instead of each chart handling the positioning in itself.
Storybook link
https://6062ad4a2d14cd0021539c1b-bgueplbuui.chromatic.com/iframe.html?args=&id=polaris-viz-charts-linechart-playground--external-tooltip&viewMode=story
Mobile
Before merging
[ ] Check your changes on a variety of browsers and devices.
[ ] Update the Changelog's Unreleased section with your changes.
[ ] Update relevant documentation, tests, and Storybook.
[ ] Make sure you're exporting any new shared Components, Types and Utilities from the top level index file of the package