When building the visualization, it makes sense to group the data by its days. For each day, create a g element. Draw a respective path element between the current and the next timestamp for each stock within each created g. Think of plotting the higher value first to make the smaller elements visible.
Additional Hint: To avoid vertical rendering lines between the paths, set the css attribute
shape-rendering. (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering)
#Trying to get the image on the assignment.
7 messages · Page 1 of 1 (latest)
Is there anyone who is available right now that can take a look at my code. I am not able to do anything and it is not working.... It has been 6 hours
after looking at your code I realised that you use d3js.
I'm not familiar with the lib and its syntax, but did you take a look at the documentation?
https://observablehq.com/@d3/streamgraph-transitions?intent=fork
(the selection d3.stackOffsetNone would make it look more like what you intent)
Or
https://d3-graph-gallery.com/graph/stackedarea_basic.html
Your initial post sounds like an exercise description.
Creating a groupElement per day sounds like you where supposed to use vanilla SVG?