Stacked bar chart with dynamic X axis representing time #4014
-
|
Hello, everyone The issue is - my X axis should represent time. And the period may be different.
How to do it with timeScale? Or it is better to use another scale for it? ps. also, there might be cases when I have data for "2025-03-05" and for "2025-03-07", so backend is returning days only if data is present for this day. Do I need to create this days manually to fill this gaps, or scales can manage it somehow? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
|
in my app, i use regular regarding UX design,
|
Beta Was this translation helpful? Give feedback.
in my app, i use regular
d3.scaleBand(), and thedomain()is set manually. if i recall correctly,d3.scaleTime()requires every date to exist, which makes it harder to handle "null" data for missing dates.regarding UX design,
d3.scaleBand()fits perfectly for my use case because i can: