fix: graphe calculation

This commit is contained in:
OpenSquared
2026-06-30 12:00:42 +02:00
parent ce7f89cf2a
commit 12c298cf83
2 changed files with 19 additions and 11 deletions

View File

@@ -34,6 +34,7 @@ interface InputMapping {
field?: string
unit?: string
range?: number[]
normalize?: boolean
}
interface DataSources {
prices: { key: string; label: string }[]
@@ -1598,6 +1599,15 @@ function TabEditor({ initialId }: { initialId?: number | null }) {
</select>
</div>
</>)}
{/* Normalisation /100 — visible uniquement pour sources surprise */}
{mapping.source === 'surprise' && (
<label className="flex items-center gap-2 cursor-pointer mt-1">
<input type="checkbox" checked={!!mapping.normalize}
onChange={e => updateMapping({ normalize: e.target.checked })}
className="accent-cyan-500" />
<span className="text-xs text-slate-400">Normaliser ÷100 <span className="text-slate-600">(coefs calibrés en fraction, pas en %)</span></span>
</label>
)}
</div>
)
})()}