Replies: 3 comments 2 replies
-
Its probably worth a different chart type to be honest. Implementing this in a bar or stacked bar wouldn't be too ideal although probably possible. I don't have the bandwidth to try and re-create it at the moment, but it could be done. You could also render a whole bunch of |
Beta Was this translation helpful? Give feedback.
-
I was thinking for the Y-axis, it could work by converting days of the week to 0 - 6 and custom render stacked bars with gaps. |
Beta Was this translation helpful? Give feedback.
-
After digging around (search keywords: filled squares) I found this issue #1068 which links to a scatter chart demo with square dots. For whatever reason that demo is not shown anywhere on the website. Basically, you'll need to use a scatter chart with data containing x, y, z (with z being the shade of the square), and use a custom renderer to paint all the squares. (See issue #1068 for sample code). The tricky part is calculating the chart aspect ratio (Width x Height) so that horizontal and vertical gaps are the same. PS: I'd recommend using a date library such as https://date-fns.org/ to simplify date calculations. Here's what I came up with so far: |
Beta Was this translation helpful? Give feedback.
-
Is it possible to create a similar chart to Github activity heat chart? Maybe customize stack bars to show days of the week.
Beta Was this translation helpful? Give feedback.
All reactions