Commit e1ba75a4 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

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

Showing with 8 additions and 1 deletion
+8 -1
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment