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

d3.scale.quantile() error in 7.3.0 that works in 3.5.5

cstrebpti opened this issue · comments

I have an html that demonstrates histogram equalization / stretching / normalization using d3.scale.quantile(). It works beautifully in version 3.5.5, but results in an error for version 7.3.0. The error is:

Uncaught TypeError: Cannot read properties of undefined (reading 'quantile')
at Object.histogramEqualize (eqHist_7.3.0.html:31:34)
at Image.img.onload (eqHist_7.3.0.html:67:31)

I got 3.5.5 from https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js and 7.3.0 from https://www.nuget.org/packages/d3. Both HTML files are in the attached zip file

HistogramEqualize.zip
.

You can read about the changes between D3 3.5.5 and D3 7.3.0 here:

https://github.com/d3/d3/blob/main/CHANGES.md