So, I'm using d3
and d3-hexbin
as global libraries:
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-hexbin.v0.2.min.js"></script>
... and referencing them in .ts
as:
/// <reference types="d3" />
/// <reference types="d3-hexbin" />
... using DefinitelyTyped definitions. However, although this works:
const svg = d3.select('#hitmap').append('svg')
... this:
const hexbin = d3.hexbin().radius(binsize + 1)
... fails with a :
Property 'hexbin' does not exist on type
'typeof "/Users/bytter/node_modules/@types/d3/index"'
Thoughts?