d3 / d3-scale

Encodings that map abstract data to visual representation.
https://d3js.org/d3-scale
ISC License
1.59k stars 286 forks source link

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

Closed cstrebpti closed 2 years ago

cstrebpti commented 2 years ago

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 .

mbostock commented 2 years ago

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