diff --git a/pdb-js/src/app/plot-details/plot-details.component.ts b/pdb-js/src/app/plot-details/plot-details.component.ts index 67c6028..a8775b0 100644 --- a/pdb-js/src/app/plot-details/plot-details.component.ts +++ b/pdb-js/src/app/plot-details/plot-details.component.ts @@ -25,6 +25,8 @@ export class PlotDetailsComponent { ngOnInit() { this.hasPercentiles = false; this.percentilesToPlot.clear(); + + console.log("plotdetails.stats: " + JSON.stringify(this.stats)); if (this.stats) { for (let i = 0; i < this.stats.dataSeriesStats.length; i++) { @@ -55,8 +57,8 @@ export class PlotDetailsComponent { toPercent(statsRow: DataSeriesStats, statsCol: DataSeriesStats, key: string){ const percentile = this.percentilesToPlot.get(key); if (percentile) { - const rowValue = statsRow.percentiles.get(percentile); - const columnValue = statsCol.percentiles.get(percentile); + const rowValue = (statsRow.percentiles)[percentile]; + const columnValue = (statsCol.percentiles)[percentile]; if (rowValue !== undefined && columnValue !== undefined) { return this.utils.toPercent(rowValue / columnValue); } @@ -67,7 +69,8 @@ export class PlotDetailsComponent { percentileStat(key: string, stat: DataSeriesStats): string{ const plotKey = this.percentilesToPlot.get(key); if (plotKey !== undefined){ - const value = stat.percentiles.get(plotKey); + console.log("stat.percentiles: ", stat.percentiles); + const value = (stat.percentiles)[plotKey]; if (value !== undefined){ return this.utils.format(value, this.valueFormat); }