You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project has recently upgraded to D3 version 5 to take advantage of the new promise-based API,
and stays compatible with D3 version 4 for all other functionality. For more details,
see the [release notes for D3 version 5.0](https://github.com/d3/d3/releases/tag/v5.0.0)
and [d3fc v14.0.0](https://github.com/d3fc/d3fc/releases/tag/v14.0.0).
But the current d3.js version is v7.6.1, which sounds like it's significantly behind.
Can you confirm that d3fc is still maintained and compatible with d3.js v7.6.1?
We've completed a sub-module-by-sub-module audit of all 15 D3 packages imported by d3fc, cross-referenced against D3 v7 changelogs. The results are much better than expected.
d3fc uses a conservative subset of D3 APIs. Most D3 v7 breaking changes (InternMap in ordinal scales, new symbol types, selectAll array conversion) don't affect d3fc's usage patterns.
Code changes required
1 line of application code:
packages/d3fc-label-layout/src/removeOverlaps.js: import { scan } → import { leastIndex } (leastIndex is a drop-in replacement — same signature, same return value)
15 bundleSpec test files:
require.resolve('d3/dist/d3.js') → require.resolve('d3').replace(/src\/index\.js$/, 'dist/d3.js') — D3 v7's exports map blocks direct subpath access, but the UMD dist file still exists
Jest config:
moduleNameMapper updated from d3-$1/dist/d3-$1 (module resolution, blocked by exports map) to <rootDir>/node_modules/d3-$1/dist/d3-$1.js (absolute path, bypasses exports map)
ESM is a non-issue
D3 v7 sub-modules are ESM-only ("type": "module"), but this doesn't affect d3fc:
Rollup marks d3 as external — never resolves or bundles them
Jest uses moduleNameMapper pointing to UMD dist files (still shipped in v7)
UMD dist files (dist/d3-*.js) exist in all D3 v7 sub-modules
D3 v7 added exports fields to sub-module package.json files. The exports map only exposes "default": "./src/index.js" and "umd": "./dist/d3-*.min.js". Direct access to d3-*/dist/d3-*.js (non-minified UMD) is blocked by Node's module resolver, even though the files exist on disk. This affected both the bundleSpec require.resolve() calls and Jest's moduleNameMapper. Both were fixed with path-based workarounds.
Activity
defnotjec commentedon Apr 16, 2026
D3 v6→v7 upgrade analysis for d3fc
We've completed a sub-module-by-sub-module audit of all 15 D3 packages imported by d3fc, cross-referenced against D3 v7 changelogs. The results are much better than expected.
Risk assessment
scan→leastIndex), d3-scale (fragile toString pattern — functional but noted)d3fc uses a conservative subset of D3 APIs. Most D3 v7 breaking changes (InternMap in ordinal scales, new symbol types, selectAll array conversion) don't affect d3fc's usage patterns.
Code changes required
1 line of application code:
packages/d3fc-label-layout/src/removeOverlaps.js:import { scan }→import { leastIndex }(leastIndexis a drop-in replacement — same signature, same return value)15 bundleSpec test files:
require.resolve('d3/dist/d3.js')→require.resolve('d3').replace(/src\/index\.js$/, 'dist/d3.js')— D3 v7'sexportsmap blocks direct subpath access, but the UMD dist file still existsJest config:
moduleNameMapperupdated fromd3-$1/dist/d3-$1(module resolution, blocked by exports map) to<rootDir>/node_modules/d3-$1/dist/d3-$1.js(absolute path, bypasses exports map)ESM is a non-issue
D3 v7 sub-modules are ESM-only (
"type": "module"), but this doesn't affect d3fc:external— never resolves or bundles themmoduleNameMapperpointing to UMD dist files (still shipped in v7)dist/d3-*.js) exist in all D3 v7 sub-modulesDiscovered issue:
exportsmap blocks subpath accessD3 v7 added
exportsfields to sub-modulepackage.jsonfiles. The exports map only exposes"default": "./src/index.js"and"umd": "./dist/d3-*.min.js". Direct access tod3-*/dist/d3-*.js(non-minified UMD) is blocked by Node's module resolver, even though the files exist on disk. This affected both the bundleSpecrequire.resolve()calls and Jest'smoduleNameMapper. Both were fixed with path-based workarounds.Results
Status
A PR with this upgrade is ready: it depends on #1922 (build infrastructure modernization) landing first. The prerequisite is tracked in #1921.
defnotjec commentedon Apr 16, 2026
PR submitted: #1923
Depends on #1922 (build infrastructure modernization) landing first.