D3 charts in ember components

Hi,

I’ am building data visualisation tool using Ember and d3. I use 2 différents components to render 2 différents charts and I want to switch between those 2 charts with a button action.

<button {{action "toggle"}} class="btn btn-default">Switch</button>
{{component1 isVisible=toggle1 }}
{{component2 isVisible=toggle2 }}

the action “toggle” just toggle the 2 variables toggle1 and toggle2 and toggle1!=toggle2

When I switch to the 2nd chart, the first “g” tag of the svg chart considers its height and width very small. My chart looks ridiculously small and I d’ont understand why?

None of what you have pasted will help explain anything. The width and height of the svg are whatever you have set it to, so just make sure you set it to what you want either with html attributes or css.

Thank you for your answer. I was completely lost. In fact it was not a Ember problem.

Sorry.