influxdata / influxdata/giraffe
Single Stat: allow timestamps to be displayed as the stat
- Dominant language
- TypeScript
- Stars
- 189
- Forks
- 33
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 4
Description
Currently, Single Stat will only render strings or numbers without any interpretation of what they represent. For example, a timestamp in JavaScript is a number that can be interpreted as milliseconds from a certain time.
**Proposal**: Allow Single Stat to interpret numbers as timestamps and render a time rather than a number.
Here is an example .csv that will _not_ show a timestamp, but rather just a number.
```
#group,false,false,true,true,true,true,false,false,true
#datatype,string,long,string,string,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string
#default,_result,,,,,,,,
,result,table,_field,_measurement,_start,_stop,_time,_value,url
,,0,traefik_config_last_reload_success,prometheus,2021-11-12T17:31:49.314450792Z,2021-11-12T18:31:49.314450792Z,2021-11-12T18:31:02.720095288Z,2021-11-12T14:43:33Z,https://www.google.com
```
The output is this but what we really want is a timestamp:

Contributor guide
Research direction
Start by tracing the Single Stat rendering path and how the CSV data type or timestamp value reaches it. Check where numeric values are formatted, then verify that timestamp-valued numbers render as a time rather than a raw number. Done means the provided timestamp example displays a timestamp in Single Stat without regressing ordinary numeric values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100