Horizontal Stacked Bar Chart Timeline #2176
Unanswered
scottfranz
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I was also able to formulate the data in a different way to try to color the bars. Here is the new data
Instead of the frequency of counts I would like the x-axis to be years. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to create a horizontal stacked bar chart that shows survey administrations of a longitudinal panel study. I would like each bar to represent each cohort. Then I would like to color a portion of each bar based on how many follow-up surveys they should have completed (how far along in the study they are).
I am using this observable example to visualize each panel cohort. Plot: Civilizations timeline / Observable | Observable
So the X-axis is time (or age) and the Y-axis is the cohort. But I would like to color portions of each bar based on how many follow up surveys they completed. Similar to something like this example Plot: Horizontal stacked bars / Observable | Observable
Except instead of grouping “counts” of a categorical variable like party affiliation. I would like to color portions of the bars based on ranges in time where they should have filled out a follow up surveys. Because I am fabricating this data and do not have a bunch of rows to count. Is this possible am I on the wrong track with the bar mark? I have not created a variable to use to color the bars yet but essentially I want the first 10 years to be a color, then the next 10 years to be a different color to denote which follow-up period they are in. Here is the code I have so far.
Here is the csv file I created mtfdata.csv. Also here is the bar chart I just need to figure out how to color portions of the bars.
Beta Was this translation helpful? Give feedback.
All reactions