-
I found an example of a group and stacked bar chart and added them to my own notebook for practice here. I'm still struggling with the syntax of Plot a little and am having difficulty sorting and filtering the two bar charts. In the group bar chart, the results are sorted in descending order and filtered to show the first six facets. My questions are:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
For question 1, you could use the domain from scale fx in the group bar chart to define the scale x of the stacked bar chart? Like so;
For question 2, if you want the first six (different!) dates in input order, you could do: |
Beta Was this translation helpful? Give feedback.
-
Thanks that works great. |
Beta Was this translation helpful? Give feedback.
For question 1, you could use the domain from scale fx in the group bar chart to define the scale x of the stacked bar chart? Like so;
For question 2, if you want the first six (different!) dates in input order, you could do:
domain: [...new d3.InternSet(crimea.map(d => d.date))].slice(0, 6)
?