Skip to content
Snippets Groups Projects
Commit e1ba75a4 authored by mathias.chouet's avatar mathias.chouet
Browse files

Graphique de résultats multivariés: le paramètre le plus long est choisi comme abscisse par défaut

parent cb132c95
No related branches found
No related tags found
1 merge request!46Resolve "Fonctionnalité : plusieurs paramètres qui varient (Voir Jalhyd#62)"
......@@ -44,6 +44,9 @@ export class VarResults extends CalculatedParamResults implements PlottableData
/** size of the longest variated parameter */
public size: number;
/** index of the longest variated parameter */
public longest: number;
/**
* tableau des ordonnées du graphe des résultats variés
*/
......@@ -60,6 +63,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData
this._extraResultHeaders = [];
this.extraResultKeys = [];
this._yValues = [];
this.longest = 0;
}
public get variatedParameters(): NgParameter[] {
......@@ -172,11 +176,14 @@ export class VarResults extends CalculatedParamResults implements PlottableData
// liste la plus longue
this.size = 0;
let i = 0;
for (const v of this._variatedParams) {
const s = v.valuesIterator.count();
if (s > this.size) {
this.size = s;
this.longest = i;
}
i++;
}
// valeurs du paramètre à calculer
......@@ -202,7 +209,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData
} else if (this.extraResultKeys.length > 0) {
defaultY = this.extraResultKeys[0];
}
this.chartX = this.chartX || this.variatedParameters[0].symbol;
this.chartX = this.chartX || this.variatedParameters[this.longest].symbol;
this.chartY = defaultY;
// calculator type for translation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment