1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: display tick values for chart Y axis (#8412)

This PR adds back in ticks for the Y axis of the chart. The ticks were
removed when updating the no content chart and this was an oversight.
This commit is contained in:
Thomas Heartman 2024-10-10 08:52:25 +02:00 committed by GitHub
parent 4130b9b143
commit 42d5eeb7e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,7 @@ import {
formatDateYMD,
formatDateYMDHM,
} from '../../utils/formatDate';
import { formatTickValue } from 'component/common/Chart/formatTickValue';
const formatVariantEntry = (
variant: [string, number],
@ -168,7 +169,15 @@ export const createBarChartOptions = (
},
},
},
y: scales ? scales.y : {},
y: {
...(scales?.y ?? {}),
ticks: {
...(scales?.y?.ticks ?? {}),
color: theme.palette.text.secondary,
callback: formatTickValue,
display: true,
},
},
},
elements,
interaction,