Zoomable D3 Angular Treemap Directive

Matt

I cannot seem to find a reusable D3 Angular Treemap Directive that zooms like Mike Bostock's here. If anyone has created one in the past or can give me any information pertaining to where I could find one I would be very greatful!

Heck, it doesn't absolutely have to be D3 either, I just need to get this working in an angular project.

Thanks!

Cyril Cherian

You will need to create a div like this in html here we will hook our treemap:

<div linear-chart></div>

Next make a directive to map the linear-chart attribute:

app.directive('linearChart', function() {
  return {
    restrict: 'EA',

    link: function(scope, elem, attrs) {
      var root = scope.data;
      //here you make your svg to the elem
      var svg = d3.select(elem[0]).append("svg")
      //tree map code
    }

Inside the link function you can copy the example code, such that you hook the tree map to the element as shown above.

Full working code here

Hope this helps!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

d3 zoomable treemap - adding new captions in the right place

From Dev

d3 zoomable treemap JSON value attributes

From Dev

Adding d3.js interactive zoomable treemap in RAW

From Dev

Angular directive within d3 SVG

From Dev

D3 zoomable yAxis in hours

From Dev

Data passed to angular d3 directive not arriving in time

From Dev

D3 on Angular: How to use d3-plugins in Angular directive

From Dev

D3 data format like zoomable sunburst chart

From Dev

Adding hyeperlinks to zoomable d3 circle pack

From Dev

D3 zoomable timeline, how to get actual extreme values?

From Dev

D3 data format like zoomable sunburst chart

From Dev

d3 Zoomable Sunburst with tooltip adjusting the % as it transitions?

From Dev

Odd stroke in treemap in D3

From Dev

d3.layout.treemap in d3 version 4

From Dev

Zoomable time series in d3.js

From Dev

AngularJS Directive for D3 Charts

From Dev

How to Hide Overlapping Text of Labels in D3 Zoomable Pack Layout?

From Dev

In D3 zoomable sunburst, how do I make the labeling dependent upon the zoom level?

From Dev

How do I draw a zoomable d3 line chart over time?

From Dev

How to Hide Overlapping Text of Labels in D3 Zoomable Pack Layout?

From Dev

In D3 zoomable sunburst, how do I make the labeling dependent upon the zoom level?

From Dev

How to "hide" text in center of d3 zoomable sunburst when zooming?

From Dev

D3 Zoomable Circle Packing in IE11 is expanding beyond the SVG boundary

From Dev

d3 treemap change color according to data passed in json

From Dev

D3 Treemap- recursive boxes not appearing

From Dev

how to set mulitple text in d3 treemap?

From Dev

Selecting JavaScript drowndown option causes D3 treemap to change

From Dev

Uncaught SyntaxError: Unexpected token with mouseover event in D3 Treemap

From Dev

how to set mulitple text in d3 treemap?

Related Related

  1. 1

    d3 zoomable treemap - adding new captions in the right place

  2. 2

    d3 zoomable treemap JSON value attributes

  3. 3

    Adding d3.js interactive zoomable treemap in RAW

  4. 4

    Angular directive within d3 SVG

  5. 5

    D3 zoomable yAxis in hours

  6. 6

    Data passed to angular d3 directive not arriving in time

  7. 7

    D3 on Angular: How to use d3-plugins in Angular directive

  8. 8

    D3 data format like zoomable sunburst chart

  9. 9

    Adding hyeperlinks to zoomable d3 circle pack

  10. 10

    D3 zoomable timeline, how to get actual extreme values?

  11. 11

    D3 data format like zoomable sunburst chart

  12. 12

    d3 Zoomable Sunburst with tooltip adjusting the % as it transitions?

  13. 13

    Odd stroke in treemap in D3

  14. 14

    d3.layout.treemap in d3 version 4

  15. 15

    Zoomable time series in d3.js

  16. 16

    AngularJS Directive for D3 Charts

  17. 17

    How to Hide Overlapping Text of Labels in D3 Zoomable Pack Layout?

  18. 18

    In D3 zoomable sunburst, how do I make the labeling dependent upon the zoom level?

  19. 19

    How do I draw a zoomable d3 line chart over time?

  20. 20

    How to Hide Overlapping Text of Labels in D3 Zoomable Pack Layout?

  21. 21

    In D3 zoomable sunburst, how do I make the labeling dependent upon the zoom level?

  22. 22

    How to "hide" text in center of d3 zoomable sunburst when zooming?

  23. 23

    D3 Zoomable Circle Packing in IE11 is expanding beyond the SVG boundary

  24. 24

    d3 treemap change color according to data passed in json

  25. 25

    D3 Treemap- recursive boxes not appearing

  26. 26

    how to set mulitple text in d3 treemap?

  27. 27

    Selecting JavaScript drowndown option causes D3 treemap to change

  28. 28

    Uncaught SyntaxError: Unexpected token with mouseover event in D3 Treemap

  29. 29

    how to set mulitple text in d3 treemap?

HotTag

Archive