Update EditAxisLabelRotation.tsx

This commit is contained in:
Nate Kelley 2025-03-31 15:03:03 -06:00
parent 905d5fb48c
commit b43b32fbde
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
1 changed files with 4 additions and 2 deletions

View File

@ -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 (
<LabelAndInput label="Axis scale">
<LabelAndInput label="Axis orientation">
<AppSegmented
block
options={options as SegmentedItem<string>[]}