mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix chart preview (#24080)
* Fix chart preview * Revert change to timeline-chart labels
This commit is contained in:
parent
ad48732bb7
commit
6ff018afc9
@ -529,6 +529,7 @@ export class HaChartBase extends LitElement {
|
||||
:host {
|
||||
display: block;
|
||||
position: relative;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
.chart-container {
|
||||
position: relative;
|
||||
|
@ -255,8 +255,7 @@ export class StateHistoryChartLine extends LitElement {
|
||||
margin: 5,
|
||||
formatter: (value: number) => {
|
||||
const label = formatNumber(value, this.hass.locale);
|
||||
// adding 5px extra because preview is not accurate #24027
|
||||
const width = measureTextWidth(label, 12) + 5 + 5;
|
||||
const width = measureTextWidth(label, 12) + 5;
|
||||
if (width > this._yWidth) {
|
||||
this._yWidth = width;
|
||||
fireEvent(this, "y-width-changed", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user