Skip to content

Commit

Permalink
Merge pull request #15 from samply/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MatsJohansen87 authored Oct 26, 2023
2 parents 7319400 + 9f94858 commit 30659e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
if (controller) {
controller.abort();
}
responseStore.set(new Map());
controller = new AbortController();
Expand Down
14 changes: 6 additions & 8 deletions packages/lib/src/components/results/ChartComponent.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
title: {
display: true,
text: yAxisTitle
}
},
},
x: {
display: viewScales,
Expand All @@ -133,12 +133,12 @@
},
ticks: (chartType === "bar") ? {
callback: (val: any) => {
if (typeof val === 'string') return val.toString()
const key: unknown = (initialChartData.data.labels[val])
if(indexAxis === 'y') return val.toString()
if (typeof val === 'string') return val
const key: unknown = (initialChartData.data.labels[val]) !== undefined
? initialChartData.data.labels[val] : val.toString();
if (typeof key !== 'string') return val.toString()
let result = (headers.get(key))
? headers.get(key) : key;
let result = (headers.get(key)) ? headers.get(key) : key;
return result
}
} : []
Expand Down Expand Up @@ -373,9 +373,7 @@
};
$: {
if ($responseStore.size !== 0) {
setChartData($responseStore);
}
setChartData($responseStore);
}
onMount(() => {
Expand Down

0 comments on commit 30659e3

Please sign in to comment.