Bar chart for simple table with a value per hour for a hole year

Hi,
I have a mariadb view that deliveres the following data when you do:

select stunde, anzahl from wp_active_hours order by 1;

+--------+--------+
| stunde | anzahl |
+--------+--------+
|      0 |    452 |
|      1 |    363 |
|      2 |    374 |
|      3 |    342 |
|      4 |    408 |
|      5 |    386 |
|      6 |    634 |
|      7 |   1071 |
|      8 |   1672 |
|      9 |   2252 |
|     10 |   3247 |
|     11 |   3488 |
|     12 |   3932 |
|     13 |   3560 |
|     14 |   3256 |
|     15 |   3226 |
|     16 |   3161 |
|     17 |   2799 |
|     18 |   2594 |
|     19 |   1990 |
|     20 |   1389 |
|     21 |    364 |
|     22 |   5057 |
|     23 |    571 |
+--------+--------+

“stunde” means “hour” and “anzahl” means “counter”.
So the content of the table is a counter for each day+nighttime-hour from 0-23 o’clock.
I would like to create a Bar chart that has the hours 0 to 23 on the x-axis and
the counter value on the y-axis.
I tried a lot but but failed so far.

Can somebody help me with this?
I have Grafana 8.3.5 with a mariadb that holds the data.

Thank you. Regards Andi

@andibill It’s easy to do with a Bar Chart (Bar chart | Grafana documentation) panel in 9.1.6. I am not sure if it’s available in 8.3.5.

Alternatively, you can take a look at the Apache ECharts panel. We tested it with 8.5.0, you may try to use it with 8.3.5.

Hello mikhailvolkov,

thank you for your reply.
That data is not static, it’s a view on another table where data is coming in every view minutes or hours.
I couldn’t figure out how I can transfer you solution to my situation.
Is this because you think these are static values?

Apache ECharts doesn’t support my version of Grafana.

Regards Andi

@andibill It does not matter if values are static or dynamic. It’s the same from the panel point of view.

What is the issue you are seeing?

@mikhailvolkov My hole query window looks so different. I’m quite new to grafana, sorry:

image

What can I do so that my query window looks like yours?