diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index 4988ff75c8..81029851a0 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -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: { diff --git a/src/util/text.ts b/src/util/text.ts index edd6afdd08..433f7b5fee 100644 --- a/src/util/text.ts +++ b/src/util/text.ts @@ -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");