coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expo SDK 48 - Web support

LeoAnt02 opened this issue · comments

commented

Time flies fast

Expo SDK 48 has been there a for a minute now and react-native-wagmi-charts doesn't support it on web
(it seems to work on iOS and Android with no issue)

Line Graph render but the tooltip is broken, we can't change graph and animation are not working -

Error when changing graphs

index.js:21 Uncaught TypeError: Cannot read properties of undefined (reading 'setAttribute')

Also with 2 console warning

WARNING in ../src/charts/line/Cursor.tsx:59:23
export 'bisectCenter' (imported as 'bisectCenter') was not found in 'd3-array' (possible exports: ascending, bisect, bisectLeft, bisectRight, bisector, cross, descending, deviation, extent, histogram, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, tickIncrement, tickStep, ticks, transpose, variance, zip)
  57 |   const xRelative = scaleX.invert(xPosition);
  58 |
> 59 |   const closestIndex = bisectCenter(timestamps, xRelative);
     |                       ^
  60 |   const pathDataDelta = Math.abs(path.curves.length - timestamps.length); // sometimes there is a difference between data length and number of path curves.
  61 |   const closestPathCurve = Math.max(
  62 |     Math.min(bisectCenter(timestamps, xRelative), path.curves.length + 1) -

WARNING in ../src/charts/line/Cursor.tsx:62:13
export 'bisectCenter' (imported as 'bisectCenter') was not found in 'd3-array' (possible exports: ascending, bisect, bisectLeft, bisectRight, bisector, cross, descending, deviation, extent, histogram, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, tickIncrement, tickStep, ticks, transpose, variance, zip)
  60 |   const pathDataDelta = Math.abs(path.curves.length - timestamps.length); // sometimes there is a difference between data length and number of path curves.
  61 |   const closestPathCurve = Math.max(
> 62 |     Math.min(bisectCenter(timestamps, xRelative), path.curves.length + 1) -
     |             ^
  63 |       pathDataDelta,
  64 |     0
  65 |   );

web compiled with 2 warnings

How to reproduce :

In example project (react-native-wagmi-charts/example)

npm install expo@^48.0.0
npx expo install --fix
npm install
npm start
then press w for web

commented

Any update on this ? @arancauchi