mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Set charts font to Roboto (#24097)
This commit is contained in:
parent
de3bf2e088
commit
9411a77f14
@ -328,6 +328,7 @@ export class HaChartBase extends LitElement {
|
|||||||
backgroundColor: "transparent",
|
backgroundColor: "transparent",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: style.getPropertyValue("--primary-text-color"),
|
color: style.getPropertyValue("--primary-text-color"),
|
||||||
|
fontFamily: "Roboto, Noto, sans-serif",
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
@ -10,7 +10,7 @@ let textMeasureCanvas: HTMLCanvasElement | undefined;
|
|||||||
export function measureTextWidth(
|
export function measureTextWidth(
|
||||||
text: string,
|
text: string,
|
||||||
fontSize: number,
|
fontSize: number,
|
||||||
fontFamily = "sans-serif"
|
fontFamily = "Roboto, Noto, sans-serif"
|
||||||
): number {
|
): number {
|
||||||
if (!textMeasureCanvas) {
|
if (!textMeasureCanvas) {
|
||||||
textMeasureCanvas = document.createElement("canvas");
|
textMeasureCanvas = document.createElement("canvas");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user