-
-
Notifications
You must be signed in to change notification settings - Fork 54
Description
📄 Description:
Currently, the BarChart component displays bars side-by-side when multiple data series share the same X-axis value. While this is great for comparison, it would be very helpful to support a stacked bar layout, where values on the same X-axis are stacked vertically instead of being placed next to each other.
This feature would be especially useful for visualizing cumulative totals or parts of a whole in a more compact and readable way.
📊 Example use case:
val data = listOf(
BarData(x = "Jan", y = 100f, group = "A"),
BarData(x = "Jan", y = 60f, group = "B"),
BarData(x = "Feb", y = 120f, group = "A"),
BarData(x = "Feb", y = 80f, group = "B"),
)
🔍 Expected behavior:
For each X-axis entry (e.g., "Jan", "Feb"), the bars for group A and B should be stacked vertically to reflect their cumulative height, rather than rendered side-by-side.
🎨 Additional idea:
It would also be great if each bar segment within the same X value could have a distinct color (e.g., different series or groups), to improve readability and make the stacked composition visually clear.

Let me know if this feature would be considered. I'd be happy to help test or provide more examples!