intellipharm-pty-ltd / dc-addons

dc.js chart addons
http://intellipharm.github.io/dc-addons/
MIT License
67 stars 27 forks source link

Angular dc and leaflet #6

Closed mjvanderveen closed 8 years ago

mjvanderveen commented 8 years ago

Hi,

Is it possible to use the dc leaflet library together with the angular-dc library to link charts, tables and maps? Or does it need more work?

Tim-Intellipharm commented 8 years ago

@mjvanderveen I have a page with a manually set up googleMarkerChart that is linked to some angular-dc charts. If they are all using the same crossfilter object it should just work. I haven't tried a google or leaflet chart within angular-dc, but I see no reason why it shouldn't work. Are you encountering any issues with it?

mjvanderveen commented 8 years ago

Hi Tim, would you be willing to add that example you refer to to the repository, so that I can see it?

Tim-Intellipharm commented 8 years ago

I have added an example on the website. Check it out at http://intellipharm.github.io/dc-addons/examples/google-angular.html

As the example works I will close the issue, however if you encounter an problem then reopen it if wish to.

mjvanderveen commented 8 years ago

I have got it working, however, I am struggling to access the leaflet Map object in the dc-chart from within the angular controller function, so that I can use a fitBounds() function on the map. Any suggestions how to do that?

Tim-Intellipharm commented 8 years ago

Sorry about that but the Angular documentation was a bit out of date. I have updated it to show you how to get the chart object. I have also updated the example to show you how to get the map object.