3 ms·
In my eyes ChatGPT is a blessing for developers. The only thing I dislike about d3 is the boilerplate code to hook it up to a div and get the first lines to re
by qwertox 4y ago
In my eyes ChatGPT is a blessing for developers.
The only thing I dislike about d3 is the boilerplate code to hook it up to a div and get the first lines to render, so yesterday I did a:
Assuming I have the following data: ```{ "status": "ok",
"data": {
"a": [[1680079200000, -199], [1680079800000, 92]],
"b": [[1680079200000, 248], [1680079800000, 259]]]
}
}```, where the first item in the array is always the unix timestamp in ms, and the second one the value of the datapoint. Also assume that I have a website with an HTML element `<div id="graph"></div>`. Please show me the code used to draw a graph of "a" and "b" with d3 into the `div` element.
And it generated all the code I hated to "create".
Then little things like "Ok, I want the time not to be in AM PM, but in HH:MM" which used to mean to visit a couple of pages, the answer's right there.
I absolutely love it.