Comments (8)
Sounds like both d3-fetch and NVD3 define d3.svg, so you won’t be able to use them together. Sorry!
from d3-fetch.
Generally, you can't include d3@3 and d3@4+ in the same HTML file.
I needed to load d3v4-force into a d3@3 project and I had luck using rollup to produce a bundle that exposed the d3@4 code as d3v4
instead of d3
.
https://github.com/dc-js/dc.graph.js/blob/develop/d3v4-force.rollup.config.js
(Doing a sed search-and-replace also worked, but this is more elegant.)
from d3-fetch.
Sounds like both d3-fetch and NVD3 define d3.svg, so you won’t be able to use them together. Sorry!
Why does something designed for fetching data define d3.svg?
Generally, you can't include d3@3 and d3@4+ in the same HTML file.
I was aware the NVD3 couldn't use d3 v4, but I thought I was avoiding that, following their examples. I'm not using node, so I'm not sure how to incorporate your solution.
from d3-fetch.
Oh I see, you parse SVG. I think I'll just modify my copy to change the definition.
from d3-fetch.
Or maybe you could make everything live under d3.fetch
?
from d3-fetch.
Sorry, but I’m not going to rename this method. The d3.svg namespace was removed from D3 in 4.0 which was released in 2016. This module added a new d3.svg method (parallel to d3.xml, d3.text, d3.json, etc.) in 2018.
from d3-fetch.
d3-fetch is circa d3@5 so it’s not compatible with d3@3 used by NVD3.
My rollup solution has nothing to do with Node. It’s just a way to bundle individual D3 ES6 modules to replaced3-fetch.v1.js
with something that don’t write to the global d3
namespace.
It’s basically the same way the official D3 bundles are created.
from d3-fetch.
Ah I see. Well, I did search and replace, which worked, but then couldn't get NVD3 to do what I wanted, to I switched to C3.
from d3-fetch.
Related Issues (20)
- Access denied under Basic Authentication HOT 3
- ReferenceError: fetch is not defined HOT 4
- json method not working on newest version.. HOT 5
- Fetch broken on local file urls HOT 1
- Documentation gap for POST between d3-request and d3-fetch HOT 1
- JSON fetching discrepancy between v4 and v5 HOT 5
- Localhost slow data loading HOT 1
- Async await with d3 fetch functions? HOT 1
- d3.text() decode UTF-16 HOT 4
- Response's body lost when error is thrown HOT 1
- d3.append returns undefined when appending result from xml() HOT 3
- How to handle fetch errors? HOT 1
- How to initialise graph object from Javascript object?
- Is there going to be an on.("progress", ...) equivalent for d3 v5? HOT 1
- Fetching large files always gives up at 50MiB HOT 1
- Fix incompatibility with strict/safe CSP HOT 1
- d3.json interprets HTTP 204 as errors HOT 3
- mention workarounds for all those environments where networks don't allow JS-loading CSV files HOT 2
- d3.json doesn't recognize my function as a RequestInit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-fetch.