Note that there are some explanatory texts on larger screens.

plurals
  1. POd3 Line graph animation not consistent cross-browser
    primarykey
    data
    text
    <p>I am working on animating a line graph using d3.js, and have been closely following <a href="http://bl.ocks.org/duopixel/4063326" rel="nofollow">this example</a>. The code I have written works just like the example...but the bug I am trying to fix is one that is also unfixed in this example. (So going forward, just follow that link to see the bug for yourself)</p> <p>In Chrome and IE10, the chart works just as it is supposed to. However, in Firefox, the line does not just draw itself from left to right. Instead, the page loads with the line already displayed, then the line <em>erases</em> itself from left to right, and then finally draws itself (again) from left to right like it should have done in the first place.</p> <p>Also notice that the line drawing is twice as fast on firefox as the other browsers - this means that the issue is with the transition itself: the transition of the stroke-dashoffset property is handled differently by firefox and the other browsers. Specifically, if we remove the transition from the equation, the main difference becomes evident: With stroke-dashoffset set to totalLength, Firefox displays the entire path, as opposed to none of it, like the other browsers do.</p> <p>So my question is: is this a bug, or is this bad form on my (and <a href="http://bl.ocks.org/duopixel" rel="nofollow">duopixel</a>'s) part? If the former is the case, does anybody know a workaround or a fix? If the latter, I would be very grateful if you could show me the correct way to do this!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload