3 ms·
I've started looking at using d3. It seems great, but a lot of stuff just seems not to work in firefox (mac), this example doesn't work gor me as well. Anyone
by acomjean 13y ago
I've started looking at using d3. It seems great, but a lot of stuff just seems not to work in firefox (mac), this example doesn't work gor me as well.
Anyone know if this cross browser breaking is normal for d3?
- eshvk 13y agoNot really, no. I haven't tested the examples in this specific article but I work with d3. Haven't had issues with FF and d3 to be specific.
- couchand 13y agoThere are a few things that Firefox doesn't do very well, notably rendering large numbers of SVG elements (thousands to tens of thousands on my little laptop). Using a `use` instead of repeating the elements literally makes this somewhat better. There are also some things that Chrome doesn't do very well, though offhand I can't think of any good examples. Right now I'm fighting with a weird cross browser issue somewhere in the interaction of `axis`, `scale`, and `zoom`, but this is the first time I've ever had a really major persistent cross browser problem with D3 (other than performance concerns). I think the mistake many D3 programmers make is to not take advantage of the tools D3 gives you; doing everything "the D3 way" is much more efficient. Witness the code sample in my other comment on this article: In the initial version, we have to break out of the declarative model and drop down to an iterative one. Practically speaking that means D3 invokes the first `each` handler, the first line of which is go back to D3 to recreate the selection we just lost. Likewise, using `each` instead of `call` for the animation tween requires an invocation of the tweening function for every element in the data. One of my favorite parts about D3 is that the cleanest looking code is almost always the most efficient.