Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mbostock
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
mbostock
6y ago
Thanks. Philippe Rivière has been helping substantially and making amazing contributions! If you think you’ve found a bug please file an issue on GitHub. (That said, d3-fetch is just a trivial wrapper on the native Fetch API, so any CORS er
92.
▲
by
mbostock
6y ago
We’ve updated hundreds of examples to the latest version. Here’s the gallery: https://observablehq.com/@d3/gallery We’re still in the process of republishing some of them and were hoping to announce tomorrow but it loo
93.
▲
by
mbostock
6y ago
Any chance you’re willing to enable CORS on these endpoints? (Access-Control-Allow-Origin: * response header.)
94.
▲
by
mbostock
7y ago
I’m so sorry you had a bad experience. We’re trying really hard to make it great! Our entire reason for being is to make it easier for people to tinker with and share examples. One of the least obvious things of Observable is that it’s not
95.
▲
by
mbostock
7y ago
The “imperative” part only applies to selections. I encourage you to read the tutorial to get a better sense of the other declarative parts of D3 (d3-scale, d3-shape), and how you can use these parts with whatever UI library you prefer. Sel
96.
▲
by
mbostock
7y ago
Everything is possible but it’s work. I’m not planning on rewriting d3-axis to be DOM-agnostic (especially because d3-axis also supports transitions). As the tutorial shows, you can use d3-axis with Observable’s hypertext literal without s
97.
▲
by
mbostock
7y ago
I would first focus on the overall design of the web application (so, look for React tutorials etc.). Treat D3 as a modular, low-level component within that application. You could start by creating static visualizations, say just using d3-a
98.
▲
by
mbostock
7y ago
I’m saying selections are harder than React, not that D3 is harder than React (because you can use React with D3 without selections). And selections are harder because, although they are functions of data, they are used to apply transformat
99.
▲
by
mbostock
7y ago
Our goal is for Observable to support the D3 community, but we’re not quite there yet in terms of collaboration features (e.g., making it easier to comment and ask questions on notebooks). We do have a nice forum, also: https://t
100.
▲
by
mbostock
7y ago
Exactly. Here’s a quick example of D3 without joins (and more are in the introduction): https://observablehq.com/@d3/d3-without-joins
101.
▲
by
mbostock
7y ago
One of the primary goals of this new introduction to demonstrate that D3 is not primarily a DOM framework, so you can use it with React, Vue, or Angular if that’s what you prefer. I encourage you to read the post!
102.
▲
by
mbostock
7y ago
Much of D3 doesn’t require the DOM, so if you want to do things like generate SVG on the server, you can use d3-shape, d3-scale, d3-path, and the like as-is. If you do want to use the DOM on the server, you could use JSDOM. d3-selection and
103.
▲
by
mbostock
7y ago
First, D3 is not primarily a DOM library or UI framework; it’s a loose collection of tools for data visualization, and is designed to work with other UI libraries. Second, the main difference with d3-selection (the part of D3 that does focu
104.
▲
by
mbostock
7y ago
Rating the difficulty of the examples is a great idea, thanks! The gallery currently leads with harder ones because they tend to be more interesting (animation and interaction), but you can find easier ones farther down. https://
105.
▲
by
mbostock
7y ago
If you use a chart typology (a tool that implements a fixed set of chart types), you tend to hit a wall with configuration. So I prefer to either fork an existing D3 example, where I can edit the code to my liking, or use a principled visua
106.
▲
by
mbostock
7y ago
Concurrent discussion: https://news.ycombinator.com/item?id=22675551 (Perhaps mods can combine the two posts?)
107.
▲
by
mbostock
7y ago
I wrote an essay on methods of comparison in 2018 that’s tangentially related (though more focused on color than position). It was inspired by an article by Lisa Charlotte Rost on log scales. https://observablehq.com/@mbosto
108.
▲
by
mbostock
7y ago
Most intros to D3 (including D3’s own home page, for now) focus first on selections for DOM manipulation. Selections are great, but given how many viable approaches there are today for DOM (React, Svelte, hypertext literals, etc.), I wanted
109.
▲
by
mbostock
7y ago
A different introduction to D3 was published a few weeks ago by Arvind Satyanarayan of MIT, if you want another perspective. Here’s the link and discussion on that. https://observablehq.com/@mitvis/introduction-to-d3
110.
▲
Learn D3
(observablehq.com)
621 points
by
mbostock
7y ago
|
71 comments
111.
▲
by
mbostock
7y ago
Good question. The times were published on Caltrain’s website, but I don’t recall where we got the distance data; it’s possible the initial implementation and data collection was done by collaborator, Vadim Ogievetsky. Wikipedia has track d
112.
▲
by
mbostock
7y ago
This is my rewrite of a chart I made about 10 years ago (using Protovis, the predecessor to D3), hence the old data. Back then there were no baby bullets on weekends! http://mbostock.github.io/protovis/ex/caltrain.
113.
▲
by
mbostock
7y ago
Here is a notebook on the subject. I’d also check out Apache Arrow. https://observablehq.com/@mbostock/manipulating-flat-arrays
114.
▲
by
mbostock
7y ago
Jeremy’s here at Observable, too!
115.
▲
by
mbostock
7y ago
Based on a comment buried in the source, this library seems to be heavily based on work by Kai Chang: http://bl.ocks.org/syntagmatic/3150059 It’s a shame Kai isn’t created in the README, LICENSE, or announcement.
116.
▲
by
mbostock
7y ago
Thanks! This is covered at the end of the post, but I can elaborate a bit here. HTM mirrors JSX syntax, which means it requires closing tags for every element. We wanted HTML5 syntax instead, which means our parser needs to handle void elem
117.
▲
by
mbostock
7y ago
We created Hypertext Literal because we wanted a convenient (and safe!) way to create DOM from JavaScript, and nothing more. As the post explains, we were inspired by lit-html, but felt we could simplify (and optimize) by focusing on creati
118.
▲
by
mbostock
7y ago
This could be likely done by editing the keyframes cell and using d3.interpolateBasis instead of linear interpolation.
119.
▲
by
mbostock
7y ago
Yeah, that would be a nice addition. Chained transitions in D3 don’t currently allow scrubbing, but this chart could be implemented using an explicit timeline to support it (or maybe that’s something that could be added to d3-transition).
120.
▲
by
mbostock
7y ago
There are decades of academic literature on visualization and perception: IEEE VIS (and InfoVis specifically), IEEE TVCG (Transactions on Visualization and Computer Graphics), ACM SIGCHI, and lots more. If you’re interested in learning abou
More ›