-
I'm trying to make a graph that displays data accordingly. The x-axis is the week itself, and the y-axis is every day of the week. But instead of a numerical value for each day of the week, it only displays whether or not the tasks are complete. Each box/value is the same size, but it should be colored either blue for complete or gray for incomplete. Is that possible or does there need to be a numerical value? And if it is a numerical value, how do I get the color to differentiate? I tried using data like the one below to make same size blocks but this doesn't take into account whether or not the task for the day is complete: Is it possible to have the day of the week data be an object instead and display the data via nested values?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The title for this question mentions bar graphs. In that context, achieving this effect is possible, but it would be tricky. Nivo's |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
HeatMap
can get you quite close to the screenshot look. Use propsxOuterPadding
andxInnerPadding
to make the heat map grid appear like vertical bars. The color scheme could have typequantize
with two steps. You might need to create a custom legend.In comparison, using
Bar
would be more complicated. The data could have 12 keys 'Monday_complete', 'Monday_incomplete', etc. and the values would be 0/1. It would be your responsibility to ensure that values for each week add up to the same number. A stacked bar graph would then look like the screenshot. You'd have to do custom tick marks for the axes and ensure that the bar order (within each stack) matches your axes. The color scheme would …