Skip to content

Commit 995617f

Browse files
committed
💄 improved the look of the KPI charts
1 parent 2f915bf commit 995617f

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

admin/src/components/ChartbrewCharts/KpiChart.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ function KpiChart(props) {
4040
marginTop: chart.chartSize === 1 ? 10 : 0,
4141
textAlign: 'center',
4242
}}>
43-
{status === 'positive' && <Icon as={ArrowUp} height="0.7rem" color="success500" />}
44-
{status === 'negative' && <Icon as={ArrowDown} height="0.7rem" color="danger500" />}
45-
<Typography variant="omega" style={{ color: Colors[status] }}>
43+
{status === 'positive' && <Icon as={ArrowUp} height="0.6rem" color="success500" />}
44+
{status === 'negative' && <Icon as={ArrowDown} height="0.6rem" color="danger500" />}
45+
<Typography variant="pi" style={{ color: Colors[status] }}>
4646
{`${comparison}% `}
4747
</Typography>
4848
<Typography variant="pi" style={{ color: Colors.neutral, display: 'inline-block' }}>
@@ -66,28 +66,26 @@ function KpiChart(props) {
6666
>
6767
{chart?.chartData?.data?.datasets.map((dataset, index) => (
6868
<Box key={dataset.id} padding={4} style={{ textAlign: 'center' }}>
69-
<Typography
70-
variant="alpha"
71-
key={uuid()}
72-
>
73-
{dataset.data && _getKpi(dataset.data)}
74-
</Typography>
7569
{chart.ChartDatasetConfigs[index] && (
7670
<Box paddingTop={chart.showGrowth ? -5 : 0} style={{ textAlign: 'center' }}>
77-
{chart.showGrowth && chart.chartData.growth && (
78-
_renderGrowth(chart.chartData.growth[index])
79-
)}
8071
<Typography
8172
variant="epsilon"
82-
style={
83-
chart.ChartDatasetConfigs
84-
&& styles.datasetLabelColor(chart.ChartDatasetConfigs[index].datasetColor)
85-
}
8673
>
8774
{dataset.label}
8875
</Typography>
8976
</Box>
9077
)}
78+
79+
<Typography
80+
variant="alpha"
81+
key={uuid()}
82+
>
83+
{dataset.data && _getKpi(dataset.data)}
84+
</Typography>
85+
86+
{chart.showGrowth && chart.chartData.growth && (
87+
_renderGrowth(chart.chartData.growth[index])
88+
)}
9189
</Box>
9290
))}
9391
</div>

0 commit comments

Comments
 (0)