Stacked bars graph with values grouped by tag (and not by time)

Hi everyone!

I need to build a stacked bar graph with data grouped not by time.

I got data with a query:
SELECT "count" FROM "autogen"."AverageTravelTime" WHERE ("unique-run-name" =~ /^$run_name$/ AND "mode" != 'all-car') AND $timeFilter GROUP BY "mode", "iteration-num"

I want to build similar stacked bar graph but with value of “iteration-num” tag in X axis:

stackedBarGraph

The problem is I can’t force grafana to stack bars when data grouped not by time.
This checkbox just does not change anything:

Any help appreciated!

An example of data:

Was you able to find a solution for this ?

Good that you asked.

I have figured out the problem is not only in the Grafana itself, the problem is that InfluxDB can’t group values NOT by time.

So, I solved the issue by writing a new plugin based on plotly.js library…

Hello,

Could you please share the plugin? I can either use or build on similar lines.

Thanks

Sure,
The plugin is here https://github.com/nikolayilyin/grafana-plotly-panel