Comments (5)
I could not reproduce the issue https://observablehq.com/d/0ab1d4e6db80f3c1
from d3-axis.
I don't know how to use observable, but I will offer the following in case it helps:
- I am using Firefox 79 (Same error in Chrome though)
- I am getting this package via NPM and bundling everything with Rollup
- I tried working backwords from the current version (1.0.12), building with each patch version until I got something that worked. 1.0.2 worked for me, indicating that the problem (whatever it may be) was introduced in 1.0.3.
- My other dependencies are:
"dependencies": {
"accessible-autocomplete": "^2.0.3",
"d3-axis": "1.0.2",
"d3-fetch": "^1.2.0",
"d3-scale": "^3.2.1",
"d3-scale-chromatic": "^1.5.0",
"d3-selection": "^1.4.2",
"d3-shape": "^1.3.7",
"d3-time": "^1.1.0",
"d3-time-format": "^2.2.3",
"d3-transition": "^1.3.2"
}
from d3-axis.
The only change in 1.0.3 was adding a module entry to the package.json, which suggests that this is a bundler misconfiguration in your project.
from d3-axis.
Aha.
I don't quite understand the difference yet, but I switched to bundling into UMD format from CommonJS. The latest version now works for me without error. I had been using the same bundler settings on other projects for a while now without error, so I assumed the problem was with this package. Sorry for the bother if the problem was just on my end. Looks like I have some reading to do on JS module formats!
Thanks!
from d3-axis.
I had the same issue - maybe commonJS does not use proper namespaces and this causes a collision with whatever package was added in the package.json? Anyway, UMD fixed it for me too
from d3-axis.
Related Issues (20)
- Support external rendering HOT 3
- How to apply pan/zoom to rotated X Axis labels? HOT 1
- Default formatter shows month name instead of Sunday HOT 2
- Date boundary issue for months with 31 days HOT 1
- Suggestion: Add axisTop example HOT 1
- `axis.tickValues` could also return `values`? HOT 3
- Render in vanilla HTML? HOT 2
- Right-align tick text in axisRight() ? HOT 1
- 如何入参是空,那么链式调用将被破坏
- Show scale extrema values in ticks HOT 1
- More configuration options?
- not able to add custom attributes to the axis HOT 1
- Ticks with varying size
- Ticks misalignment HOT 2
- An option to disable the domain line HOT 1
- An option to generate grid lines HOT 3
- Ability to use `d3.timeXXX` on a scaleBand HOT 8
- Ability to set axis ticks count when using axis `tickFormat` function HOT 6
- d3-axis does not update SVG attributes when switching between axis orientations HOT 3
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-axis.