visx
visx copied to clipboard
Accessor called with undefined on hover
When you have series in an xy-chart with missing data at the end, visx will try to execute xAccessor with undefined
when hovering over the part where data is missing.
See https://codesandbox.io/s/serene-worker-7plx1?file=/src/Example.tsx
When you hover over the rightmost 1/3 of the graph, you'll get a
Cannot read property 'x' of undefined
Thanks for raising this to our attention 🙏 Hmm, I think currently there is an assumption that each series has the same number of data points but we could likely fix that.
A simple work around for this is to handle undefined in the accessors e.g., d => d?.x/y