mirror of
https://github.com/gauvainboiche/ketapk.git
synced 2026-09-02 11:13:11 +02:00
feat: Comments translation to EN
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { CLINICAL_THRESHOLDS } from './pkCore.js';
|
||||
import { t } from './i18n.js';
|
||||
|
||||
// Les couleurs de zone sont volontairement fixes (indépendantes du thème d'interface) :
|
||||
// elles reproduisent le dégradé de référence de l'outil KetaPK original. Seul le texte
|
||||
// (zone.textHex) est choisi pour rester lisible sur cette couleur de fond opaque.
|
||||
// The zone colors are deliberately fixed (independent of the interface theme):
|
||||
// they reproduce the reference gradient of the original KetaPK tool. Only the text
|
||||
// (zone.textHex) is chosen to remain readable on this opaque background color.
|
||||
export function updateChartAnnotations(chart, mode, currentYMax) {
|
||||
const thresholds = CLINICAL_THRESHOLDS[mode];
|
||||
const annotations = {};
|
||||
@@ -36,14 +36,14 @@ export function updateChartAnnotations(chart, mode, currentYMax) {
|
||||
export function adjustChartYScale(chart, mode, datasets) {
|
||||
let highestValue = 0;
|
||||
|
||||
// Recherche de la valeur maximale atteinte parmi tous les modèles affichés
|
||||
// Find the maximum value reached among all displayed models
|
||||
datasets.forEach(ds => {
|
||||
ds.data.forEach(val => {
|
||||
if (val > highestValue) highestValue = val;
|
||||
});
|
||||
});
|
||||
|
||||
// Ajustement dynamique à 110 % de la valeur pic (ou plancher à 50 ng/mL si vide)
|
||||
// Dynamic adjustment to 110% of the peak value (or floor at 50 ng/mL if empty)
|
||||
let targetYMax = highestValue > 0 ? Math.ceil(highestValue * 1.1) : 50;
|
||||
|
||||
chart.options.scales.y.max = targetYMax;
|
||||
|
||||
Reference in New Issue
Block a user