D3 Stacked Chart with array or JSON data

后端 未结 3 2128
谎友^
谎友^ 2021-02-10 09:39

I want to create a Stacked bar chart like http://bl.ocks.org/mbostock/3886208 . But I don\'t want to use CSV file.

How can I create Stacked chart using array or JSON dat

3条回答
  •  误落风尘
    2021-02-10 10:24

    I know late for replying to this one. I modified @heshjse's code for D3 version 4. When I tried the above code with d3 v3, it's working fine. But we had limitation to use version 4, I was getting problem bcoz of some changes in d3 v4. So adding the code which worked for me. I hope it helps.

    This should work fine for Json format in d3 v4.

    
    
    
        
        
    
    
        

提交回复
热议问题