Skip to content

Commit

Permalink
Merge pull request #652 from intuitem/improve_donut_styling
Browse files Browse the repository at this point in the history
improve donut styling
  • Loading branch information
ab-smith authored Jul 14, 2024
2 parents 43de0c8 + cb920c0 commit b36d7b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
7 changes: 3 additions & 4 deletions frontend/src/lib/components/Chart/DonutChart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
}
},
legend: {
top: 20,
// left: 'center',
right: 10,
top: 'bottom',
right: '0',
orient: orientation
},
series: [
Expand All @@ -70,7 +69,7 @@
emphasis: {
label: {
show: true,
fontSize: '40',
fontSize: '24',
fontWeight: 'bold'
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
const default_value = nullable ? null : selectedValues[0];
$: {
$value = multiple ? selectedValues : selectedValues[0] ?? default_value;
$value = multiple ? selectedValues : (selectedValues[0] ?? default_value);
handleSelectChange();
}
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/routes/(app)/analytics/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,7 @@
name="riskScenariosStatus"
title={m.riskScenariosStatus()}
values={data.riskScenariosPerStatus.values}
/>
<BarChart
classesContainer="basis-1/3 card p-4 bg-white"
name="usedMatrices"
title={m.usedRiskMatrices()}
labels={data.usedRiskMatrices.map((matrix) => matrix.name)}
values={data.usedRiskMatrices.map((matrix) => matrix.risk_assessments_count)}
orientation="horizontal"
/>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
export let isScored: boolean;
export let max_score: number;
const leadResult = Object.hasOwn(m, resultI18n) ? m[resultI18n]() : m.notAssessed() ?? '';
const lead = Object.hasOwn(m, statusI18n) ? m[statusI18n]() : m.notAssessed() ?? '';
const leadResult = Object.hasOwn(m, resultI18n) ? m[resultI18n]() : (m.notAssessed() ?? '');
const lead = Object.hasOwn(m, statusI18n) ? m[statusI18n]() : (m.notAssessed() ?? '');
$: classesText = resultColor == '#000000' ? 'text-white' : '';
</script>
Expand Down

0 comments on commit b36d7b4

Please sign in to comment.