3 ms·
This gets less ideal when you want to implement some kind of hover tooltip that shows that value at a particular point. Then you need to figure out if that poin
by Octoth0rpe 3y ago
This gets less ideal when you want to implement some kind of hover tooltip that shows that value at a particular point. Then you need to figure out if that point is _really_ 0.001, or if it was actually 0 and you just swapped it with 0.001 so that your graph lib didn't puke. FWIW echarts lets you replace 0s with null or '', but that doesn't help with the negative values issue.
Edit: not disagreeing with you at all, just trying to make the situations where this might be problematic a bit more concrete.
- jxf 3y ago> This gets less ideal when you want to implement some kind of hover tooltip that shows that value at a particular point. A data value doesn't have to be identical with the value used for plotting purposes. Haven't used Apache Echarts but this separation of concerns is trivial in D3, for example.
- couchand 3y agoThis comment so beautifully distills the difference in philosophy between D3 and Echarts. Charting libraries like Echarts provide a few stock visualizations and a handful of knobs to turn. If there's not a knob for the parameter you wish to adjust, you're out of luck. D3 provides instead a visual grammar: a toolbox for building your own visualizations.