mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Fix chart preview (#24080)
* Fix chart preview * Revert change to timeline-chart labels
This commit is contained in:
parent
6487b9b7ea
commit
f2e35dc70a
@ -524,6 +524,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