influxdata / influxdata/influxdb

Shade area under lines doesn't work with negative values

Open
#22,685 2 comments 0 reactions 0 assignees View on GitHub
area/ui area/vis wontfix
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

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:__

* System info: Linux 5.4.0-77-generic x86_64
* InfluxDB version: InfluxDB 2.0.8
* Other relevant environment details: n/a

InfluxDB 2.0.8:
![image](https://user-images.githubusercontent.com/16231555/137638164-5f676ab8-3cab-436d-8517-ab7116190544.png)

Chronograf:
![image](https://user-images.githubusercontent.com/16231555/137638171-e0cc79e8-876c-46bc-9c7a-36de135b1d7e.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the chart with mixed negative and positive values and the “shade area under lines” option. Trace the chart-rendering path responsible for the shaded region; done means the fill is between each line and the x-axis, including for negative values, without changing positive-value behavior.

Written by the indexing model from the issue text.

Assessment

Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.