Comments (9)
oh, God. its simplier than I thought.
test: /\.woff|woff2|ttf|eot|svg|png|jpg$/,
and d3-svg-legend
matches by svg
word
the right pattern should be /\.(woff|woff2|ttf|eot|svg|png|jpg)$/
from d3-legend.
I just checked and this worked for me. Are you sure you're not accidentally overriding that legend variable at some point later in your script?
from d3-legend.
This is the output I'm getting
from d3-legend.
Hm, very strange. My output is:
from d3-legend.
Just tried with an empty project and it works. Ok, I will play around webpack configuration I have in the real project.
And btw, why I can't import 'default' object by import legend from 'd3-svg-legend'
? I receive an error: module has no default export (again, in typescript).
from d3-legend.
Hmmm just tried that and it is working for me. I'm not familiar with typescript, can you tell from the types file if that would impact the default object? https://github.com/susielu/d3-legend/blob/master/types/d3-svg-legend.d.ts
from d3-legend.
@cranetm did you have any updates on this?
from d3-legend.
yeap, I haven't found proper reason, but issue in webpack.config.js.
I have next rule:
{
test: /\.woff|woff2|ttf|eot|svg|png|jpg$/,
use: [{
loader: 'file-loader',
options: {
publicPath: '/assets/build/',
outputPath: 'assets/'
}
}]
}
and somehow it copies your lib to my assets folder.
I've fixed it with adding exclude: /d3-svg-legend/,
to the rule.
from d3-legend.
Oh wow surprised this didn't come up before, good catch.
from d3-legend.
Related Issues (20)
- label color remains black in dark mode
- Merge fork that fixes npm audit error
- ENH: labelFormat to support numeraljs format HOT 1
- NS_ERROR_FAILURE errors HOT 15
- help wanted: irregular patch legend HOT 5
- Custom Color and Shape? HOT 2
- legend size defaults to 5 when data has length of 1 HOT 2
- Feature Request: Vertical legend text alignment options HOT 6
- cellclick and "#tag"+d.key.replace(/\s+/g, '') HOT 4
- Support for d3.scaleTime() HOT 2
- legend with clamp values HOT 1
- Scrollable Legend HOT 1
- import problems d3 version 5 HOT 5
- Property 'labelWrap' does not exist on type 'LegendColor' HOT 1
- Legend not showing up properly if hidden using jQuery
- Interface LegendColor, issues with cellFilter method, argument type is missing
- labelWrap only wraps white space
- .on functions don't work with d3 v6 HOT 2
- please upgrade to d3 v6 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-legend.