tomwanzek / d3-ng2-service

A D3 service for use with Angular.
MIT License
205 stars 42 forks source link

selection-multi not available #48

Closed fi4sk0 closed 7 years ago

fi4sk0 commented 7 years ago

Hey there,

I'm having trouble using the "styles" and "attrs" method on Selections. I looked through the source and it seems the d3-selection-multi package gets exported in the src/bundle-d3.d.ts file but not in src/bundle-d3.js. When I manually add a line that exports everything from d3-selection-multi, I can use "styles" and "attrs".

bundle-d3.js (excerpt):

export * from 'd3-scale';
export * from 'd3-selection';
export * from 'd3-shape';

bundle-d3.d.ts (excerpt):

export * from 'd3-scale';
export * from 'd3-selection';
export * from 'd3-selection-multi';
export * from 'd3-shape';

Thanks for you time and for your awesome work!

tomwanzek commented 7 years ago

@fi4sk0 Thanks for catching this issue and pinning it down right away. Unlike d3-transition, d3-selection-multi is purely side-effect in JavaScript. So as compilation drops the exported interfaces/types there is no remaining export dependency.

I am testing out a minor tweak locally.

tomwanzek commented 7 years ago

@fi4sk0 Thx again. The fix is in the patch release 1.10.1.

fi4sk0 commented 7 years ago

@tomwanzek thanks! You're awesome!