Keep funbox annotation line transparent (#2784)

This commit is contained in:
DanGonite57 2022-03-27 17:45:22 +01:00 committed by GitHub
parent 020ac5cb24
commit f06cab2c38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -770,7 +770,9 @@ export async function updateColors<
(chart.options as PluginChartOptions<TType>).plugins.annotation
.annotations as AnnotationOptions<"line">[]
).forEach((annotation) => {
annotation.borderColor = subcolor;
if (annotation.id !== "funbox-label") {
annotation.borderColor = subcolor;
}
(annotation.label as LabelOptions).backgroundColor = subcolor;
(annotation.label as LabelOptions).color = bgcolor;
});