Set charts font to Roboto (#24097)

This commit is contained in:
Petar Petrov 2025-02-06 13:16:35 +02:00 committed by Bram Kragten
parent dcb04067b8
commit a30e501031
2 changed files with 2 additions and 1 deletions

View File

@ -328,6 +328,7 @@ export class HaChartBase extends LitElement {
backgroundColor: "transparent",
textStyle: {
color: style.getPropertyValue("--primary-text-color"),
fontFamily: "Roboto, Noto, sans-serif",
},
title: {
textStyle: {

View File

@ -10,7 +10,7 @@ let textMeasureCanvas: HTMLCanvasElement | undefined;
export function measureTextWidth(
text: string,
fontSize: number,
fontFamily = "sans-serif"
fontFamily = "Roboto, Noto, sans-serif"
): number {
if (!textMeasureCanvas) {
textMeasureCanvas = document.createElement("canvas");