-
Beta Was this translation helpful? Give feedback.
Answered by
YY88Xu
Dec 14, 2023
Replies: 3 comments 1 reply
-
chart
.interval()
.data(data)
.transform({ type: 'stackY' })
.transform({ type: 'sortX', by: 'y', reverse: true })
.encode('x', 'month')
.encode('y', 'value')
.encode('series', 'color')
.style('fill', (d) => d.color) // 👈🏻 |
Beta Was this translation helpful? Give feedback.
0 replies
-
chart |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YY88Xu
-
为什么 .encode('color', 'color') 不行呢 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chart
.interval()
.data(data)
.transform({ type: 'stackY' })
.transform({ type: 'sortX', by: 'y', reverse: true })
.encode('x', 'month')
.encode('y', 'value')
.style('fill', (d) => d.color)