Skip to content

Commit

Permalink
Webcast: fix when live data has more than 100 data points
Browse files Browse the repository at this point in the history
  • Loading branch information
amirch1 committed Nov 28, 2020
1 parent a8f5261 commit b892227
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class WebcastEntryPreviewComponent extends WebcastBaseReportComponent imp
confine: true,
formatter: params => {
const { value: value1, dataIndex } = params[0];
const value2 = params[1] ? params[1].value.toFixed(2) + '%' : this._translate.instant('app.common.na');
const value2 = params[1] !== null && params[1] !== undefined ? params[1].value.toFixed(2) + '%' : this._translate.instant('app.common.na');
const progressValue = ReportHelper.time(String(dataIndex / (pointsCount -1) * this._duration)); // empirically found formula, closest result to expected so far
let tooltip = `
<div class="kEntryGraphTooltip">
Expand Down Expand Up @@ -280,6 +280,8 @@ export class WebcastEntryPreviewComponent extends WebcastBaseReportComponent imp
if (viewers.report && viewers.report.table && viewers.report.table.header && viewers.report.table.data) {
const {tableData} = this._reportService.parseTableData(viewers.report.table, this._dataConfig[ReportDataSection.table]);
yAxisData1 = this._getViewersAxisData(tableData, pointCount);
} else if (pointCount !== 100) {
yAxisData1 = Array.from({ length: pointCount }, () => 0);
}

// set chart data with both live and vod data series
Expand Down

0 comments on commit b892227

Please sign in to comment.