The details card for counter entities displays as a categorical/color bar plot. A bar plot is not useful for interpreting trends since it destroys any notion of ordering/magnitude, as can be seen in the example image below.

Counter values are obviously numeric, they should display as a line plot. I can't think of a use case where you would prefer a bar plot, considering what counters are intended to be used for.
Pull up the details card for a counter entity from anywhere in the UI.

This counter is fed by a separate automation that counts lightning strikes based on messages received over MQTT from a device using an AS3935 lightning sensor. I am not including the automation because this issue applies to all counter entities as far as I am aware, but I note that the actual value counting works entirely as expected and the only problem is with how the counter history is displayed in the frontend.
counter:
lightning_strikes:
initial: 0
step: 1
restore: no
minimum: 0
icon: "mdi:lightning-bolt"
NA
I assume this is just a mistake with how counter entities are configured to be displayed. Without really knowing a lot about the HA internals, I would guess that the frontend decides what type of plot to use based on the data type of the entity value column in the history database. Presumably counter values are stored as some type of int, which the frontend assumes is categorical.
We only show line graphs for entities with a unit of measurement, maybe we should add the option to set a unit of measurement for counters.
That sounds like a reasonable solution, the only caveat I'd give is that it would seem logical that counters should show as a line graph by default.
Thinking about this some more, I guess we could also fix it on the frontend. By setting the unit to "#" when fetching the history.
I agree. By default a counter should be a line graph as a number is a number. We don't need a UOM for a line graph we just require it for our purposes for categorization. Defaulting it to # is a good idea
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Issue is still present.
Most helpful comment
We only show line graphs for entities with a unit of measurement, maybe we should add the option to set a unit of measurement for counters.