influxdata / influxdata/influxdb
Single Stat: Allow users to set a default when no data exists
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Users should be able to set a default value when no data exists. Optionally users should have the ability to convert numeric values or null to a user defined string. Grafana solves this problem by allowing users to set values to text.
__Current behavior:__
"No Results" text is displayed in the single state panel.
__Desired behavior:__
The ability to hardcode a single value of 0, Healthy, Alive, N/A, No data, etc when my queries return zero data.
__Use case:__
When I have a dashboard full of cells and healthy state is no data, it would be nice to show 0, Healthy, etc instead of `No Results`. The no results makes me second guess if the query is correct or if my system is operating as expected. A lot of services may not expose a specific measurement when everything is operating as expected. You can imagine a dashboard that has multiple cells with "No Results" doesn't look very useful.
Contributor guide
Research direction
No files or tests are named. Start by locating the Single Stat panel and the path that displays “No Results” for empty query results. Define the configuration and expected behavior for default numeric or string values, including optional conversion, and add coverage showing that the configured value appears when no data exists.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100