diff --git a/src/app/components/results-graph/results-graph.component.ts b/src/app/components/results-graph/results-graph.component.ts index 5cc0a4590950a287b9b2d5a42131b4523f1322dc..7e775c89a5dd14cd0f761a21cb7ea25b6326f6d5 100644 --- a/src/app/components/results-graph/results-graph.component.ts +++ b/src/app/components/results-graph/results-graph.component.ts @@ -204,11 +204,14 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont }, label: (tooltipItem, data) => { const lines: string[] = []; + const nbLines = that._results.getVariatingParametersSymbols().length; for (const v of that._results.getVariatingParametersSymbols()) { const series = that._results.getValuesSeries(v); const line = v + " = " + series[tooltipItem.index].toFixed(nDigits); if (v === this.chartX) { - lines.unshift(""); + if (nbLines > 1) { + lines.unshift(""); + } lines.unshift(line); } else { lines.push(line); @@ -277,11 +280,14 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont }, label: (tooltipItem, data) => { const lines: string[] = []; + const nbLines = that._results.getVariatingParametersSymbols().length; for (const v of that._results.getVariatingParametersSymbols()) { const series = that._results.getValuesSeries(v); const line = v + " = " + series[tooltipItem.index].toFixed(nDigits); if (v === this.chartX) { - lines.unshift(""); + if (nbLines > 1) { + lines.unshift(""); + } lines.unshift(line); } else { lines.push(line);