Skip to content

Commit

Permalink
format and add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
NXXR committed Jul 13, 2023
1 parent 0869bb0 commit b184d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/SimulationChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export default function SimulationChart(): JSX.Element {
);

const {formatNumber} = NumberFormatter(i18n.language, 3, 8);
const numberFormat = '#,###.';

const rootRef = useRef<Root | null>(null);
const chartRef = useRef<XYChart | null>(null);

// Effect to create chart instance
// TODO: extract everything but chart setup so it only runs once
useEffect(
() => {
// Create root and chart
Expand All @@ -121,7 +121,7 @@ export default function SimulationChart(): JSX.Element {
root.locale = i18n.language === 'de' ? am5locales_de_DE : am5locales_en_US;

// Set number formatter
root.numberFormatter.set('numberFormat', numberFormat);
root.numberFormatter.set('numberFormat', '#,###.');

// Create x-axis
const xAxis = chart.xAxes.push(
Expand Down

0 comments on commit b184d81

Please sign in to comment.