Replies: 1 comment
-
I don't think there is any easy way to deal with this, unfortunately. I've seen questions related to step interpolation edges come up in the Vega-Lite forums, and never seen an answer that avoids adding edge-points to the underlying data. Please let us know if you figure out a good way around it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to show the recent time in the data using a different color for an area chart with a dark line on top.
Since line and area marks are considered single entities I used
transform_calculate
to essentially group the data into 2 groups.Using the stocks data I have the following observations -
This gives the following -
However since the stroke lines are not exactly what I wanted (orange strokes in blue region and vice versa - although explainable), I decided to layer line on area as follows -
This gives the following -
This is more like what I want, but if you look closely you will notice that at the color transition the stroke (line chart) has a gap.
It is actually easy to explain that - recent actually starts from 2005-02-01 and the time between 2005-01-01 to 2005-02-01 does not have the line segment since there is no data and also that the two groups are separate.
I would expect the same behavior from area chart too, but its area seems to extend beyond.
I mean, ideally I want the line to behave the same way so that there are no discontinuities. Is there a way to make that happen? Also having an understanding of why area behaves this way would be helpful too.
Beta Was this translation helpful? Give feedback.
All reactions