mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FEATURE: adds a new chart report to track pageviews (#6913)
This commit is contained in:
@ -473,11 +473,26 @@ Report.reopenClass({
|
||||
.utc(report[endDate])
|
||||
.locale("en")
|
||||
.format("YYYY-MM-DD");
|
||||
report[filledField] = fillMissingDates(
|
||||
JSON.parse(JSON.stringify(report[dataField])),
|
||||
startDateFormatted,
|
||||
endDateFormatted
|
||||
);
|
||||
|
||||
if (report.modes[0] === "stacked_chart") {
|
||||
report[filledField] = report[dataField].map(rep => {
|
||||
return {
|
||||
req: rep.req,
|
||||
color: rep.color,
|
||||
data: fillMissingDates(
|
||||
JSON.parse(JSON.stringify(rep.data)),
|
||||
startDateFormatted,
|
||||
endDateFormatted
|
||||
)
|
||||
};
|
||||
});
|
||||
} else {
|
||||
report[filledField] = fillMissingDates(
|
||||
JSON.parse(JSON.stringify(report[dataField])),
|
||||
startDateFormatted,
|
||||
endDateFormatted
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user