7 ms·
Any other libraries (that are as low of level) as d3.js? Is D3 still being used heavily in production by people's experience?
by kickout 7y ago
Any other libraries (that are as low of level) as d3.js? Is D3 still being used heavily in production by people's experience?
- suyash 7y agoVega lite comes to mind
- kulahan 7y agoI started a new project using it for a project I was working at my last job ~ a year or two ago. I got a few hits from recruiters interested in it once I added it to my resume. I liked it quite a bit. It's pretty fast and decently easy to use. Plus, all the examples Mike Bostock has thrown around online really helped for giving me examples of how to do various visualizations I was interested in.
- stared 7y agoI used to use D3.js as the default go-to for data. Now I start with Vue.js, and use D3.js only inside some components when I need, animations between transitions. D3.js, as someone else already noted, is "jQuery for data". And yes, it has its good parts, but the same as for jQuery) the problem is with: - mixing static HTML/SVG with generated - no modularization (every modularization is custom) For the latter, while it may not be a big deal for small projects, for bigger it sucks. For big stories, I created a game in D3.js. Modularization was... well, argument why I rewrote it a few years later to Vue.js.
- LysPJ 7y agoAm I right in thinking that you are using Vue.js to create/delete/update the DOM elements? If so, how does performance typically compare to using the usual D3 enter()/exit() etc methods for that?
- stared 7y agoI used to do performance-sensitive things in D3.js (e.g. many moving dots). For projects with Vue.js, the performance was not my concern. In any case, if needed, you can use D3.js rendering within a Vue component.
- LysPJ 7y agoThanks, that makes sense. I'm currently doing D3.js rendering within a Vue component. I suspect that my code will be cleaner if I switch to the Vue.js constructs for managing the DOM, rather than D3's enter()/exit()/update(), so even if the performance is ultimately the same, there should still be a maintainability win. It sounds like it's worth me doing a Vue implementation and running some benchmarks.
- paulgb 7y agoD3 is still a useful library for visualization even if you replace the DOM manipulation with React, Vue, Svelte, etc. I think the trend is to use D3 as a library but use a more modern framework to manage the DOM. I have a browser extension (treeverse.app) where the entire UI is D3. I probably wouldn't write it that way today, but the codebase dates back to ~2014 and it's held up fine.
- thibautg 7y agoI also mostly use d3 for its powerful helper functions nowadays: scales and axes, colors, svg path generation, geographic projections, array functions like d3.group (formerly d3.nest), csv/tsv parsing etc. I tend to leave DOM manipulation to Vue.js unless I need to animate transitions between states. I find it easier to reason about binding data to an html/svg template with Vue than to mess with d3 data joins and enter/update/exit pattern. d3 is and stays an impressive piece of work.
- LysPJ 7y agoDo you find there is any performance difference using Vue.js to do DOM manipulation rather than the D3 methods?
- thibautg 7y agoI haven't run benchmarks but I also haven't noticed a difference in performance. With Vue.js, I use computed properties + v-for in html template. With D3 I use the the enter/update/exit pattern with d3.selectAll(...).data(...).join(...). Both seem to only modify the needed DOM elements. Vue.js uses a virtual DOM while D3 attaches a __data__ property to DOM elements.
- LysPJ 7y agoThanks, that's helpful to know about how you implemented it in Vue vs D3, and that there wasn't a noticeable performance difference for your use case.
- sailfast 7y agoUsed in production? Yes. Alternatives at a low level? Hard to say - it really does allow you to do a lot at a very low level if you want BUT... - Vega Lite / Vega - HighCharts (paid) - ChartJS - Raphael (unsure if this is still used as much) - Leaflet / Turf for GIS visualizations - Server-side? PyGal? http://www.pygal.org/en/stable/ http://www.pygal.org/en/stable/ If you don't want to go so low-level there are a huge number of D3 abstractions that allow you to pick your chart and work with the data. Britecharts from EventBrite is one example of an actively maintained abstraction. http://eventbrite.github.io/britecharts/ http://eventbrite.github.io/britecharts/
- acomjean 7y agoVega is low level, but built on top of D3. https://vega.github.io/vega/about/vega-and-d3/ https://vega.github.io/vega/about/vega-and-d3/ Vega lite is what I use as my day to day web graphing driver (it exports to svg which is awesome...)
- kickout 7y agoThanks for this. Never seen HighCharts. Looks nice (pending $$$)
- inferiorhuman 7y agoHighCharts is very nice if you don't want to invest the time into honing your d3 skills.
- vosper 7y agoWe use Highcharts at work, and have for years. It's a really good library, definitely worth the money. We had a recent adventure with building new charts in Victory, but performance was not good and we came back to Highcharts and removed all our Victory code. We're still happy with that decision :)
- lmeyerov 7y agoWe end up using some of the d3 helpers, like on axis & scales, but go straight to chart libraries + custom DOM/SVG/webgl for the rest, and normal React framework for interactivity. The d3 functional helpers are still real gems and IMO under-appreciated. I think it was rewritten a few years to help expose those better (e.g., for tree shaking.) As soon as you go to react & friends, most of the d3 model does become redundant, and Yet Another Thing to burden the team. There's still a temptation to reuse beautiful d3 gallery items posted by others, but generally, they're annoying to patch up & now you must maintain them. Better to use dedicated maintained libs if that's what you want. There have been attempts to do Standard D3 Chart libs, but afaict it's a graveyard of abandonware, and I approach most efforts here with strong caution. (The trend for the last few years has been each bigco to release their own NIH framework and then abandon as the authors leave, and little incentive for D3 design consultants to maintain old projects.)
- simonsarris 7y agoHow low level? I make GoJS, a powerful diagramming library (the focus is more on diagrams and interactivity, than data). It's low level in that you can make a lot of different things with it, but higher level in that it has things like an undo manager. https://gojs.net/latest/index.html https://gojs.net/latest/index.html