0

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!

user3217883
  • 1,216
  • 4
  • 38
  • 65
  • Since the d3 chart works just fine on its own without that error, there must be some kind of collision with other dependencies of the app its being inserted into. – user3217883 Mar 22 '21 at 00:46
  • Couldn't find a way around this so I was forced to give up on React and go back to straight javascript. – user3217883 Mar 23 '21 at 20:42

0 Answers0