Update therapeutic range min/max values no longer mandatory

This commit is contained in:
2026-02-10 19:52:25 +00:00
parent a1298d64a7
commit fbba3d6122
2 changed files with 14 additions and 12 deletions

View File

@@ -638,20 +638,20 @@ const SimulationChart = React.memo(({
/>
);
})}
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.min && !isNaN(parseFloat(therapeuticRange.min)) && (
<ReferenceLine
y={parseFloat(therapeuticRange.min) || 0}
label={{ value: t('refLineMin'), position: 'insideTopLeft' }}
y={parseFloat(therapeuticRange.min)}
label={{ value: t('refLineMin'), position: 'insideBottomLeft', style: { fontSize: '0.75rem', fontStyle: 'italic', fill: CHART_COLORS.therapeuticMin } }}
stroke={CHART_COLORS.therapeuticMin}
strokeDasharray="3 3"
xAxisId="hours"
yAxisId="concentration"
/>
)}
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && (
{showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.max && !isNaN(parseFloat(therapeuticRange.max)) && (
<ReferenceLine
y={parseFloat(therapeuticRange.max) || 0}
label={{ value: t('refLineMax'), position: 'insideTopLeft' }}
y={parseFloat(therapeuticRange.max)}
label={{ value: t('refLineMax'), position: 'insideTopLeft', style: { fontSize: '0.75rem', fontStyle: 'italic', fill: CHART_COLORS.therapeuticMax } }}
stroke={CHART_COLORS.therapeuticMax}
strokeDasharray="3 3"
xAxisId="hours"