Open tonypowa opened 7 months ago
This issue is a test copy of an issue in another repo. Original issue: https://github.com/grafana/grafana/issues/#78523
Triage summary: The XY Chart panel does not respect manually set 'min' and 'max' x-axis field overrides, leading to unintended axis scaling and content disappearance.
Recommended labels:
area/panel/xychart type/bug
Hi @tonypowa, it seems like you're facing a panel-specific issue within Grafana. Considering the details you've provided, especially concerning the XY Chart panel and field overrides, this issue appears to be most relevant to the DataViz project, which often addresses visualization components and functionalities within Grafana. I would suggest transferring this issue to that project for the appropriate development team to take a closer look at the problem with X axis min and max adjustments not working as expected.
Meta:
Elaboration:
Hello @tonypowa! First off, thank you for the detailed issue report. It's clear you've put effort into describing what you expected vs. what actually happened. I have a few clarifying questions to better understand the issue and to reproduce it accurately on our side. Here are the details we'd need:
Thank you again, and looking forward to your response so we can help resolve this issue for you.
Meta:
Hi @tonypowa 👋, thanks for reporting this issue with the XY Chart panel. I'll try to shed some light on it, but first, here's something to brighten your day:
Why don't scientists trust atoms? Because they make up everything! 😄
Now, regarding your problem with the x-axis min and max values, it seems like there's an issue with how the overrides are being applied or potentially a bug within the panel itself since this is a new feature in Grafana. Before we escalate this to the maintainers, could you please confirm the following:
Providing this additional information can help us get to the root of the problem faster. In the meantime, I'll label this for the attention of the Grafana team.
Cheers!
Meta:
What happened?
XY Chart Panel displaying a dataframe with two fields A and B.
Single series with manual mapping: A on X and B on Y
Changing A field overrides to have a field override "sandard options > min" to force the x min value has no impact on the chart (I still see all the data below the configured min).
Adding a second override "standard options > max" to force the x max will have the consequence of emptying the whole chart with the x axis disappearing.
What did you expect to happen?
I was expecting the min and max field overrides to change the min and max of the X axis.
These options work correctly on the Y axis.
Did this work before?
This panel did not exist in previous version of Grafana
How do we reproduce it?
Add a XY Chart panel on a source with multiple fields (requirement of the XY Chart panel)
Choose a manual mapping
Place a field F1 on X and a field F2 on Y, chart should render
Change F1 field config min
Is the bug inside a dashboard panel?
| Key | Value |
|--|--|
| Panel | xychart @ 10.2.0-62263 (c4fefd8da9) |
| Grafana | 10.2.0-62263 (c4fefd8da9) // Enterprise |
Panel debug snapshot dashboard
```json { "panels": [ { "datasource": { "type": "grafana", "uid": "grafana" }, "type": "xychart", "title": "Reproduced with embedded data", "gridPos": { "h": 13, "w": 15, "x": 0, "y": 0 }, "id": 2, "targets": [ { "refId": "A", "datasource": { "type": "grafana", "uid": "grafana" }, "queryType": "snapshot", "snapshot": [ { "schema": { "refId": "A", "meta": { "typeVersion": [ 0, 0 ], "custom": { "customStat": 10 }, "transformations": [ "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField", "calculateField" ] }, "fields": [ { "name": "time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true }, "config": { "interval": 1 } }, { "name": "A-series", "type": "number", "typeInfo": { "frame": "float64", "nullable": true }, "labels": {}, "config": {} } ] }, "data": { "values": [ [ 1700650857882, 1700650857883, 1700650857884, 1700650857885, 1700650857886, 1700650857887, 1700650857888, 1700650857889, 1700650857890, 1700650857891, 1700650857892, 1700650857893, 1700650857894, 1700650857895, 1700650857896, 1700650857897, 1700650857898, 1700650857899, 1700650857900, 1700650857901, 1700650857902, 1700650857903, 1700650857904, 1700650857905, 1700650857906, 1700650857907, 1700650857908, 1700650857909, 1700650857910, 1700650857911, 1700650857912, 1700650857913, 1700650857914, 1700650857915, 1700650857916, 1700650857917, 1700650857918, 1700650857919, 1700650857920, 1700650857921, 1700650857922, 1700650857923, 1700650857924, 1700650857925, 1700650857926, 1700650857927, 1700650857928, 1700650857929, 1700650857930, 1700650857931, 1700650857932, 1700650857933, 1700650857934, 1700650857935, 1700650857936, 1700650857937, 1700650857938, 1700650857939, 1700650857940, 1700650857941, 1700650857942, 1700650857943, 1700650857944, 1700650857945 ], [ 31.42269234414482, 31.175037356871776, 31.2849657819782, 31.037553995859096, 30.84003471902399, 30.76237478552567, 30.275481435181717, 30.63125666340542, 31.09744512728512, 30.634650254723876, 30.71598832434324, 30.876552985401744, 31.02845028501585, 30.811092840203422, 31.257762627968795, 31.204624306043797, 31.253226138582583, 31.66255386767431, 31.7534743258057, 32.03386949600406, 32.045967802057625, 31.910727451328274, 31.72730694302625, 31.303377000044136, 31.690223137970364, 32.16813935269694, 32.025828463424716, 31.565989602199366, 31.08859432046894, 31.539622201407965, 31.748071959279294, 31.693818573367825, 31.45234400899654, 31.68422041786557, 31.455991948195194, 31.1225654472938, 31.607428004696004, 31.802351916434116, 31.823997923147406, 32.171203172317895, 32.336670857705485, 32.61501479870718, 32.40301925325115, 32.31750708278521, 32.160086456948726, 31.82834274915073, 31.369398440484403, 31.445381709751118, 31.523984915754223, 31.78720290013204, 32.17332437638885, 32.154537241977266, 32.560371299882824, 33.04386582561043, 32.945102923091895, 33.199537913665644, 33.568455287256164, 33.30463411896829, 33.39221647871621, 33.36382435289684, 33.20266206679198, 33.59618039846349, 33.49317439283686, 33.74351440785902 ] ] } } ] } ], "fieldConfig": { "defaults": { "custom": { "show": "points", "pointSize": { "fixed": 5 }, "axisPlacement": "auto", "axisLabel": "", "axisColorMode": "text", "axisBorderShow": false, "scaleDistribution": { "type": "linear" }, "axisCenteredZero": false, "hideFrom": { "tooltip": false, "viz": false, "legend": false } }, "color": { "mode": "palette-classic" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "value": null, "color": "green" }, { "value": 80, "color": "red" } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "A-series" }, "properties": [ { "id": "max", "value": 40 } ] } ] }, "transformations": [ { "id": "calculateField", "options": { "mode": "binary", "reduce": { "reducer": "sum" }, "binary": { "left": "A-series", "operator": "+", "right": "10" } } } ], "options": { "seriesMapping": "manual", "series": [ { "pointColor": {}, "x": "A-series", "y": "A-series + 10" } ], "tooltip": { "mode": "single", "sort": "none" }, "legend": { "showLegend": true, "displayMode": "list", "placement": "bottom", "calcs": [] }, "dims": { "x": "A-series" } } }, { "gridPos": { "h": 7, "w": 9, "x": 15, "y": 0 }, "id": 5, "options": { "content": "Environment (with versions)?
Grafana: 10.2
OS: Linux
Browser: Firefox
Grafana platform?
None
Datasource(s)?
Not relevant