Problem using group by with unix datetime value

I’m using a instalation from docker hub with version 9.4
I need to import some data from github and create dashboards from it, I’m using the Github plugin GitHub plugin for Grafana | Grafana Labs

The problem is: I have a panel in a dashboard to show a bar chart with total commits/day, but I can’t do that because of timestamp, I can’t group the date by day because he consider the timestamp with miliseconds.

Here is the transformation

Here is debug

I tried to use overrides and the date are formatted correctly, but the new formatting is not used for transformations.

I just need to group this commits by day, how can I do ?

:Hi @jaconsmorais,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

Can you please try to reproduce this same issue on https://play.grafana.org/ and then share the dashboard link so that we can view it?

Thanks

I think this is a bug

Hi!
You can reproduce the problem with this panel
{ "type": "table", "title": "Github Commits", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "id": 12, "targets": [ { "datasource": { "type": "grafana-github-datasource", "uid": "_sJ_nZm7k" }, "refId": "A", "queryType": "Commits", "repository": "grafana", "owner": "grafana", "options": { "gitRef": "main" } } ], "options": { "showHeader": true, "cellHeight": "sm", "footer": { "show": false, "reducer": [ "sum" ], "countRows": false, "fields": "" } }, "fieldConfig": { "defaults": { "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "value": null, "color": "green" }, { "value": 80, "color": "red" } ] }, "color": { "mode": "thresholds" } }, "overrides": [] }, "datasource": { "uid": "_sJ_nZm7k", "type": "grafana-github-datasource" }, "pluginVersion": "9.5.0-cloud.5.a016665c", "transformations": [ { "id": "convertFieldType", "options": { "fields": {}, "conversions": [ { "targetField": "committed_at", "destinationType": "time" } ] } }, { "id": "groupBy", "options": { "fields": { "committed_at": { "aggregations": [], "operation": "groupby" }, "pushed_at": { "aggregations": [ "count" ], "operation": "aggregate" } } } } ] }

I don’t know, Convert Field Type do not ask for output format, ask for input format, the format that de date is received from data source.

Hi, you can reproduce this problem using this panel.
{ "type": "table", "title": "Github Commits", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "id": 12, "targets": [ { "datasource": { "type": "grafana-github-datasource", "uid": "_sJ_nZm7k" }, "refId": "A", "queryType": "Commits", "repository": "grafana", "owner": "grafana", "options": { "gitRef": "main" } } ], "options": { "showHeader": true, "cellHeight": "sm", "footer": { "show": false, "reducer": [ "sum" ], "countRows": false, "fields": "" } }, "fieldConfig": { "defaults": { "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "value": null, "color": "green" }, { "value": 80, "color": "red" } ] }, "color": { "mode": "thresholds" } }, "overrides": [] }, "datasource": { "uid": "_sJ_nZm7k", "type": "grafana-github-datasource" }, "pluginVersion": "9.5.0-cloud.5.a016665c", "transformations": [ { "id": "convertFieldType", "options": { "fields": {}, "conversions": [ { "targetField": "committed_at", "destinationType": "time" } ] } }, { "id": "groupBy", "options": { "fields": { "committed_at": { "aggregations": [], "operation": "groupby" }, "pushed_at": { "aggregations": [ "count" ], "operation": "aggregate" } } } } ] }

Here is the screenshot

Thank you yosiasz, I could make it using apache echart.

1 Like

meu prazer you are welcome