Histograms
Bin discrete samples into continuous, non-overlapping intervals. 将离散样本分成连续的不间断的间隔
- d3.bin - create a new bin generator.bin生成器
- bin - bins a given array of samples.使用数组生成样本
- bin.value - specify a value accessor for each sample.指定分组用的值
- bin.domain - specify the interval of observable values.指定分组区域
- bin.thresholds - specify how values are divided into bins.指定分隔间
- d3.thresholdFreedmanDiaconis - the Freedman–Diaconis binning rule.弗里德曼分组法
- d3.thresholdScott - Scott’s normal reference binning rule.斯科特分组法
- d3.thresholdSturges - Sturges’ binning formula.斯特奇斯分组法
Interning
d3内部使用
InternMap 和 InternSet 类分别扩展了原生 JavaScript Map 和 Set 类,通过在确定键相等时绕过 SameValueZero 算法来允许日期和其他非原始键。 d3.group、d3.rollup 和 d3.index 使用 InternMap 而不是原生 Map。为方便起见,导出这两个类。
- d3.InternMap - a key-interning Map.
- d3.InternSet - a value-interning Set.