Show axis units on blur plot
Build & Deploy / build (push) Successful in 2m40s
Build & Deploy / deploy (push) Failing after 3s

This commit is contained in:
2025-09-29 00:04:32 +02:00
parent d744028971
commit c888ffeec4
+7 -5
View File
@@ -52,17 +52,17 @@ const formatAperture = (value) => {
const getAxisConfig = (plotType) => {
switch (plotType) {
case PlotTypes.DISTANCE:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance };
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
case PlotTypes.ZOOMED:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance };
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
case PlotTypes.NORMALIZED:
return { label: 'Scene distance ÷ subject distance', accessor: (point) => point.normalizedDistance };
case PlotTypes.SEPARATION:
return { label: 'Focus-relative distance (m)', accessor: (point) => point.focusOffset };
return { label: 'Focus-relative distance (m)', accessor: (point) => point.focusOffset, ticksuffix: ' m' };
case PlotTypes.DIOPTER:
return { label: 'Diopter difference (1/m)', accessor: (point) => point.diopterDifference };
return { label: 'Diopter difference (1/m)', accessor: (point) => point.diopterDifference, ticksuffix: ' 1/m' };
default:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance };
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
}
};
@@ -144,6 +144,7 @@ const PlotSection = ({ lensCurves, plotType, setPlotType }) => {
title: axisConfig.label,
gridcolor: 'rgba(148, 163, 184, 0.2)',
zerolinecolor: 'rgba(148, 163, 184, 0.4)',
...(axisConfig.ticksuffix ? { ticksuffix: axisConfig.ticksuffix } : {}),
},
yaxis: {
title: 'Blur radius (% of sensor diagonal)',
@@ -151,6 +152,7 @@ const PlotSection = ({ lensCurves, plotType, setPlotType }) => {
gridcolor: 'rgba(148, 163, 184, 0.2)',
zerolinecolor: 'rgba(148, 163, 184, 0.4)',
range: [0, maxY * 1.1],
ticksuffix: ' %',
},
}}
useResizeHandler