mardi 21 avril 2015

Ember error while rendering D3 pie chart - chart are not displayed properly

I have a weird issue using Ember 1.11 (built with ember-cli) and D3 Pie chart.

The Pie Chart is not displayed properly on ember routes. It works only on index route (index.hbs).

The generated HTML code is the same on routes templates and index.hbs. I've used the same view/component on index.hbs as on routes.

You can fix this issue if you go to Inspect Element and remove entire tag (removing it's content line by line does not fix it!). This is weird.

I've installed a sample Ember application on this address: http://ift.tt/1bgrhrN

On the index you will see the chart. On the menu routes, there is the same chart (rendered with same view as it was rendered on index.hbs), but not displayed properly (it works a bit when you hover over that area).

The HTML code generated by the Pie chart view is the same on all pages. If you copy the code from <div id="pieChart">..</div> and paste it in a empty static html page, the chart will be rendered correctly.

This issue can be reproduced using: Firefox/Chrome. In safari it seems to work.

Here is a paste2 which renders the chart.

The entire application code before build can be found here.

Edit: I've also reported this issue on github, here.




Aucun commentaire:

Enregistrer un commentaire