plot line mark to separate stacked areas

I want to add borders to an area mark but the line mark I added does not fit with the area mark: Carbon Emissions / RND | Observable

1 Like

I don’t see a line that you’ve specified. If you used Plot.line by grouping the data you’ve got, then I wouldn’t expect it to fit since you’re area mark is going to aggregate that data. I think the easiest thing to do, though, is to just add a stroke channel to the area mark.

Also, you can simplify the creation of the text to use just one text mark that references an array containing all the text and placement information.

I’ve sent you a suggestion that implements both those changes.

1 Like

oh, sorry, I posted the wrong link. The line mark is from this one: https://observablehq.com/d/e689816a818e4b52

Thank you, the stroke is the best solution. And thanks again for the hint with the text mark.

1 Like