Bar chart continues with previous value if currently no value is available
See original GitHub issueHi,
i’m currently creating a bar graph with daily metrics. So one bar per day with the last value. But some value are not available at the start of the day… I would expect that the bar chart then does not show any bar for this day till the value is available. But sadly it just copies the previous value for the chart. In the legend i see NaN as expected.
Here is my graph card
type: 'custom:mini-graph-card'
entities:
- sensor.daily_sensor
name: Daily_sensor
hours_to_show: 240
aggregate_func: last
lower_bound: 0
upper_bound: 200
hour24: true
icon: none
show:
labels: false
graph: bar
group_by: date
color_thresholds:
- value: 0
color: '#32CD32'
- value: 35
color: '#FFD700'
- value: 50
color: '#FF0000'
- value: 100
color: '#660000'
Also i hover over the current bar (where no value is available) it shows the value of the day before
Do you have any ideas how i can make the graph not showing a bar if the value is not yet available?
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
A Complete Guide to Bar Charts | Tutorial by Chartio
Bar charts are a fundamental visualization for comparing values between groups of data. Use this guide to learn how to get the most...
Read more >Blank cells show up as zeros in chart - Microsoft Community Hub
Hello, I'm taking simple averages of my data (e.g. =AVERAGE(B3:Q3)) and then plotting them as a line in a scatter plot. However, there...
Read more >Creating a chart in Excel that ignores #N/A or blank cells
Now make your plot with your new column and Excel ignores #N/A value and will not plot them as zeroes. Important: do not...
Read more >How to suppress 0 values in an Excel chart - TechRepublic
This method has little to no impact. For the most part, the chart treats the 0 values as if they're still there, because...
Read more >No Data showing Gap in line chart
If you'd like to keep the line to be straight and continuous even the actual value is null, that means the specific day...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
ah okay… i see the problem. The problem here is that if i set it to 0 its not correct… because 0 would be a valid value but i don’t have any value. Currently i’m resetting my sensor to an empty value at midnight. But i can also use NaN or None or whatever. Any non integer value AFAIK.
What i would expect is to simply draw no bar… just an “empty placeholder” till the value is available. Maybe you make the “use_last_value” configurable? to something like “empty value” or “skip” or something else?
Do you think such a change is possible?
I’ve checked quickly the utility_meter but this also doesn’t fit my use-case. As the value is not an increase or decrease value .
More or less i receive a kind of random value for each day. And i don’t want to display any other value till the value is available.
Thanks
Duplicate of #366