grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
65.29k stars 12.18k forks source link

Timeseries: Negative Y does not render properly, when there is metric for short period of time #45916

Closed frenkye closed 2 years ago

frenkye commented 2 years ago

What happened: Trying new Negative Y transformation and I notice, that our nightly backup LVM snapshots are causing graph not to render, because on now-24h range there are only metrics from 5 min to N hours over night depend on server. Datapoint are there on mouseover, but graph will not render unless we hide the temporal metric or cancel the transofrmation. As shown in the video.

What you expected to happen: Graph will render.

How to reproduce it (as minimally and precisely as possible): Create some temporal mountpoint with node_exporter & prometheus as datasource.

Anything else we need to know?:

Environment:

https://user-images.githubusercontent.com/13994937/155727698-00d9df74-04ec-4d3e-9cbb-be6e13e1db8c.mov

sdilk commented 2 years ago

we have the same issue, i think it is if there are 0 or null values.

in the sourcecode the * -1 part is done without checking the input. packages/grafana-ui/src/components/uPlot/utils.ts line 67

i think a simple input validation should fix it.