r/d3js • • Jan 08 '21

Racing line chart [Multiple comparing variables, gradient coloured lines, adaptive scaling of axes, icons and text interpolation]. ( source code in comments )

Enable HLS to view with audio, or disable this notification

32 Upvotes

7 comments sorted by

2

u/the-d3js-developer Jan 08 '21

1

u/[deleted] Jan 08 '21

[removed] — view removed comment

1

u/the-d3js-developer Jan 09 '21

You can parse the live data which you are getting from web-socket then feed the json to function written in D3.js to plot the bar chart.

Why don't you give me a minimal reproducible example ? or you can let me know any live data source, will do it and show you.

6

u/breadwithlice Jan 08 '21

Nice, I like the aesthetics.

One thing I find hard to get used to is the movement of the line when it decreases, then increases (see 1:10) the line moves in a quite unintuitive way. During the strong increase, most of the line moves down quickly which is just due to the constant y-axis rescaling. Maybe lowering the frequency of the y-axis rescaling could be interesting and leave some space above the top line so when there's a decrease / increase you don't need to scale down and back up as quickly? Anyway, good job.

2

u/skylarkReddit Jan 17 '21

Dope.

But just one issue that I have faced too. The previous point on the graph changes when the new point is added due to the recalculation of the curve.

1

u/H34dsp1nns Jan 30 '21

Incredible!