-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: setting getter-only property "event" #1396
Comments
Sorry, no, we're not moving to webpack babel etc. But that's not the problem here. The problem here is just what it says: we're trying to set |
@gordonwoodhull what about importing only the parts of D3 that are actually used by DC.js? How would you interface with d3-ng2-service? |
Sorry, I don't know anything about d3-ng2-service. I agree it's going to be a problem if you try to use dc.js with a custom build of d3 designed for some other library. I'd consider adding a custom build of d3 to dc.js (e.g. an |
The index.js approach will be fine I guess. That will deduplicate the d3(-*) dependencies and reduce overall footprint of DC.js. Obviously treeshakable chart modules would be better, when only using one or a few charts from DC. |
Yes, rollup supports tree shaking - I think we'd just need to I hope to break up dc.js into dozens of rollup modules, but it's a huge effort so I hope to find volunteers to help with that. I guess that would be dc.js 4.0. Contributions are welcome for other module systems - I just don't personally intend to learn/support anything but rolllup. |
@Justus-Maier can you please try the current 3.0 branch, it no longer tries to assign |
@kum-deepak thank you, I'm no longer encountering this error. |
Glad to hear it! |
I'm using d3-ng2-service to integrate D3 into Angular, now I'm also trying to use dc.js (3.0 branch), but I get errors when trying to draw a simple barchart, because d3-ng2-service builds it's own D3 with the modularised parts, and dc.js brings another instance of D3 (copying inbetween gives read-only errors).
@kum-deepak did you touch #1175 yet? Can't follow your reference to it..
It feels the solution for me lies within..
How can I inject my instance of D3 into DC.js?
The text was updated successfully, but these errors were encountered: