Xacto
Xacto

Reputation: 3

D3 line style when using step-before or step-after interpolation

I have a line chart using step-before interpolation (though the same question applies if step-after is used). I want the vertical line segments to be colored lighter than the horizontal line segments. How can I accomplish this?

Upvotes: 0

Views: 885

Answers (1)

Robert Longson
Robert Longson

Reputation: 124129

A single path must be in a single colour. You'd have to break the chart up into individual paths, one for each vertical and horizontal piece in order to colour them individually.

Upvotes: 1

Related Questions