Skip to content

Commit

Permalink
Merge pull request #137 from samply/fix/passedchartcolors
Browse files Browse the repository at this point in the history
fix: convert backgroundcolor from string to string array
  • Loading branch information
patrickskowronekdkfz authored Oct 15, 2024
2 parents dbad8c1 + ac0afa9 commit 20e9b57
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/lib/src/components/results/ChartComponent.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
): ChartDataSets => {
let dataSet: number[];
// This is bad. For some reason the passed value is a string not a array of strings. With this conversion it does work!
if (typeof backgroundColor == "string") {
backgroundColor = backgroundColor.split(",");
}
if (perSite) {
dataSet = chartLabels.map((label: string) => {
const site: Site | undefined = responseStore.get(label);
Expand Down

0 comments on commit 20e9b57

Please sign in to comment.