How do we implement a stacked bar chart using the new bar chart panel

Hey, is it possible to do a stacked bar chart using the new bar chart panel?

You can do bars with the new time series panel and then do the stacking

https://grafana.com/docs/grafana/latest/panels/visualizations/time-series/graph-time-series-as-bars/

https://grafana.com/docs/grafana/latest/panels/visualizations/time-series/graph-time-series-stacking/

I was hoping to do something similar to the “JavaScript framework” example on the bar chart’s docs https://grafana.com/docs/grafana/latest/panels/visualizations/bar-chart/ :frowning:

Ohhhh ok that example is grouping, not stacking :sweat_smile: (grouped bars vs stacked bars are different) your data needs to have multiple numerical fields for grouping. Something like the Google sheets data source or using a csv is best for that. That example is actually on the play.Grafana.com dashboard - check out the explore and inspect views to see how it was configured https://play.grafana.org/d/YI95GyqMz/1-new-features-in-v8-0?orgId=1

Huh, neat, I’ll have to put that link in my bookmarks

Mhm, I think there might be something to be done using the Labels to Fields transform :thinking_face: will report back if it works