d3 / d3-scale

Encodings that map abstract data to visual representation.

Home Page:https://d3js.org/d3-scale

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: scale.domain is not a function

ponytony opened this issue · comments

my code:

       const y = d3.scaleLinear()
                .domain([0, 600])
                .range([this.height - this.margin.top, this.margin.top])
                .ticks(1)
        g.attr('transform', `translate(${this.margin.left}, 0)`)
                .call(d3.axisLeft(y))

if i add 'ticks(1)', console would report the error
version of d3 is 7.0.0,