Comments (6)
Thanks for the take. I do not seem to experience the problem so far. The associated demo I built in tomwanzek/d3-ng2-demo and the live github page for a few reference components seems to handle the events as expected.
The injected service singleton seems to work alright in the project generated from the angular-cli webpack version (1.0.0-beta.11-webpack.8. with some dependency fixes for typescript and awesome-typescript-loader.)
Did you experience a different event-handling use case, where you saw the live-binding issue?
from d3-ng2-service.
Hmm I need to recheck, maybe it was fixed in one of the patches
from d3-ng2-service.
No I still have the problem but I import directly from d3-selection
in a vendor.ts files that is bundled for all my modules, maybe that's the problem, I don't create a new instance of the d3 lib for each component
from d3-ng2-service.
Try writing it as a service, that way you have a singleton, which is created once and that is the one you pull in. Feel free to look at the source code in the repo, I always just pull directly from the import that feeding the service.
Another possible explanation could have to do with which module system the TS code is compiled to. I matched mine essentially to the one used by angular-cli. But, if one goes commonjs
, say, that might lead to a different experience with d3.event
.
from d3-ng2-service.
I'm closing this issue. If you experience the issue using this service, let me know and I will reopen it. Cheers.
from d3-ng2-service.
Yup, no prob :)
from d3-ng2-service.
Related Issues (20)
- [BREAKING CHANGE] Update Major Release to Align with D3 v5
- Problem with d3.geo HOT 2
- traceur 404 (Not Found) Error HOT 1
- [d3-contour] Update to Minor Version 1.2
- Unresolved variables and methods HOT 7
- Type 'SVGPathSeg' is not assignable to type 'EnterElement'. Property 'ownerDocument' is missing in type 'SVGPathSeg'. HOT 5
- Update d3-geo to 1.10 HOT 1
- Property 'getBoundingClientRect' does not exist on type 'BaseType'. Property 'getBoundingClientRect' does not exist on type 'Window'.
- Update Angular dependencies HOT 1
- [d3-interpolate] Update to Minor Version 1.2
- [d3-color] Update to Minor Version 1.2
- [d3-format] Update to Minor Version 1.3
- upgrade to angular 6 HOT 14
- How to read a JSON file and load the data into a Treemap? HOT 1
- Load svg from File
- has no exportted member 'ThresholdArrayGenerator'. HOT 15
- Support for Angular 7 HOT 2
- Include d3-floorplan
- Failed AOT compilation HOT 2
- No Explanation as WHY we need a D3 service 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-ng2-service.