How to fix "TypeError: Cannot read property 'min' of undefined" in D3?

169 views Asked by At

I'm trying to implement the Techan (d3 charts) lib into my React app. Getting error:

TypeError: Cannot read property 'min' of undefined". "module.exports C:/Users/Greg/Projects/react-demos/my-react-splitter-layout/node_modules/techan/dist/techan.js:1422"

Line 1422 is:

heikinashi: require('./heikinashi')(indicatorMixin, accessor.ohlc, d3.min, d3.max),

My React js imports are:

import * as d3 from "d3"
import * as techan from "techan"

I've been googling for hours. I have tried every "fix" described here but none of them work.

Any other suggestions would be greatly appreciated!

0

There are 0 answers