Skip to content

Commit bd79d99

Browse files
authored
fix(chart) :: name refrence line feilds explictly
`chart.handlebars` emits 6 keys for a reference line and stringifies so that unset fields come in as null. This is now explictly set in the type by making it a `Record`.
1 parent 0199e60 commit bd79d99

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎frontend/src/apexcharts.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ const sqlpage_chart = (() => {
5656

5757
const referenceColor = colorNames.get(isDarkTheme ? "gray-lt" : "gray");
5858

59-
type ReferenceLine = { [property: string]: string | number | null };
59+
type ReferenceLine = Record<
60+
"xline" | "xline_end" | "yline" | "yline_end" | "label" | "color",
61+
string | number | null
62+
>;
6063

6164
const named_color = (name: unknown): string | undefined =>
6265
typeof name === "string" ? colorNames.get(name) : undefined;

0 commit comments

Comments
 (0)