Reputation: 829
I have a cubism d3 chart on my page. I also want to add more charts to the page. Is it possible to add more d3 charts in the same page or will i have to use some other libraries?
I am asking this because every visualization in d3 uses .axis and if i give some style to cubism graph then it would affect other graphs as well.
Upvotes: 0
Views: 805
Reputation: 1688
I would recommend wrapping the entire generating code in a function which specifies which DOM element you want to put the chart in as a parameter. This will leverage javascript closure and everything should work itself out.
Upvotes: 1