influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.61k stars 3.54k forks source link

Shade area under lines doesn't work with negative values #22685

Open mcrapts opened 2 years ago

mcrapts commented 2 years ago

InfluxDB has an option to shade area under lines. However, shading should always be between the line and the x-axis. InfluxDB shades the area between the bottom of the chart and the line. This causes very strange behavior for negative values.

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Create a data source that has negative and positive values
  2. Create a chart and select "shade area under lines"
  3. Notice that the area is below the lines is always shaded, even if the value is negative. With negatives values, the area between the x-axis and line should shaded.

Expected behavior: Area between x-axis and line shaded.

Actual behavior: Area between x-axis and bottom of chart is shaded (similar to Chronograf).

Environment info:

InfluxDB 2.0.8: image

Chronograf: image

dsnet commented 2 years ago

The "shade area under line" feature currently does literally what it describes. That said, I also prefer for the behavior to be shade area under line toward zero. Perhaps that should be an option under "shade area under line"?

mcrapts commented 2 years ago

Is this going to be fixed? In InfluxDB v1.x it works as expected. The behavior in InfluxDB v2.x is really weird.