History-Card: Start of x axis depends on entities to show
### Checklist
- [x] I have updated to the latest available Home Assistant version.
- [x] I have cleared the cache of my browser.
- [x] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
If you show in the history-card only numeric value entities, this issue does not arise.
But if you combine numeric values and a switch state, the x-axis starts where the switch text ends.
<img width="487" height="433" alt="Image" src="https://github.com/user-attachments/assets/f3881d99-1295-43f3-bca2-779295aa9427" />
<img width="487" height="433" alt="Image" src="https://github.com/user-attachments/assets/a1069d75-19dd-4618-a933-cf6dc42f7177" />
### Describe the behavior you expected
The visible x-axis should be maximized.
This can be solved by putting the entity text of switches above/below the bar, as this is done with numeric values
### Steps to reproduce the issue
1. Create a history-card using a switch and numeric value.
2. Give the switch a short and long name
See the difference where the graph starts on the x-axis
### What version of Home Assistant Core has the issue?
2026.06.0
### What was the last working version of Home Assistant Core?
_No response_
### In which browser are you experiencing the issue?
Firefox, Chrome, Safari
### Which operating system are you using to run this browser?
Linux, IOS
### State of relevant entities
```txt
```
### Problem-relevant frontend configuration
```yaml
```
### JavaScript errors shown in your browser console/inspector
```txt
```
### Additional information
_No response_
1 条评论