d3 / d3-hexbin

Group two-dimensional points into hexagonal bins.
https://observablehq.com/collection/@d3/d3-hexbin
BSD 3-Clause "New" or "Revised" License
240 stars 34 forks source link

Inconsistency between README and global namespace #13

Closed reblace closed 7 years ago

reblace commented 7 years ago

Between 0.2.0 and 0.2.1, the d3 hexbin global namespace changed from 'd3_hexbin' to 'd3'. The README now incorrectly gives the example of using 'd3_hexbin' as the namespace.

Version 0.2.0:

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
  (factory((global.d3_hexbin = global.d3_hexbin || {})));
}(this, function (exports) { 'use strict';

Version 0.2.1:

// https://github.com/d3/d3-hexbin Version 0.2.1. Copyright 2017 Mike Bostock.
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
    typeof define === 'function' && define.amd ? define(['exports'], factory) :
    (factory((global.d3 = global.d3 || {})));
}(this, (function (exports) { 'use strict';

README v0.2.1:

<script src="https://d3js.org/d3-hexbin.v0.2.min.js"></script>
<script>

var hexbin = d3_hexbin.hexbin();

</script>