diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx index 11acbacfb..73fc07012 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/EditAxisLabelRotation.tsx @@ -17,7 +17,7 @@ export const EditAxisLabelRotation: React.FC<{ }> = React.memo(({ xAxisLabelRotation, onChangeLabelRotation }) => { const selectedOption: IBusterMetricChartConfig['xAxisLabelRotation'] = useMemo(() => { return ( - options.find((option) => option.value === xAxisLabelRotation)?.value || options[0]?.value! + options.find((option) => option.value === xAxisLabelRotation)?.value ?? options[0]?.value! ); }, [xAxisLabelRotation]); @@ -25,8 +25,10 @@ export const EditAxisLabelRotation: React.FC<{ onChangeLabelRotation(value.value as IBusterMetricChartConfig['xAxisLabelRotation']); }); + console.log(selectedOption, xAxisLabelRotation); + return ( - + []}