Skip to content

Commit

Permalink
fix: display tick values for chart Y axis (#8412)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomasheartman authored Oct 10, 2024
1 parent 4130b9b commit 42d5eeb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion frontend/src/component/personalDashboard/createChartOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
formatDateYMD,
formatDateYMDHM,
} from '../../utils/formatDate';
import { formatTickValue } from 'component/common/Chart/formatTickValue';

const formatVariantEntry = (
variant: [string, number],
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 42d5eeb

Please sign in to comment.