mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: ensures we don't apply charts options to other modes (#13570)
This reverts commit 1f74ea0f08
.
This commit is contained in:
parent
4b27de8c4b
commit
33464cb07e
@ -300,6 +300,7 @@ export default Component.extend({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (report.error === "not_found") {
|
if (report.error === "not_found") {
|
||||||
this.set("showFilteringUI", false);
|
this.set("showFilteringUI", false);
|
||||||
}
|
}
|
||||||
@ -382,17 +383,13 @@ export default Component.extend({
|
|||||||
return EmberObject.create(
|
return EmberObject.create(
|
||||||
Object.assign(tableOptions, this.get("reportOptions.table") || {})
|
Object.assign(tableOptions, this.get("reportOptions.table") || {})
|
||||||
);
|
);
|
||||||
} else {
|
} else if (mode === "chart") {
|
||||||
const chartOptions = JSON.parse(JSON.stringify(CHART_OPTIONS));
|
const chartOptions = JSON.parse(JSON.stringify(CHART_OPTIONS));
|
||||||
|
|
||||||
let chartGrouping = this.get("reportOptions.chartGrouping");
|
|
||||||
if (!chartGrouping && report.chartData) {
|
|
||||||
chartGrouping = Report.groupingForDatapoints(report.chartData.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
return EmberObject.create(
|
return EmberObject.create(
|
||||||
Object.assign(chartOptions, this.get("reportOptions.chart") || {}, {
|
Object.assign(chartOptions, this.get("reportOptions.chart") || {}, {
|
||||||
chartGrouping,
|
chartGrouping:
|
||||||
|
this.get("reportOptions.chartGrouping") ||
|
||||||
|
Report.groupingForDatapoints(report.chartData.length),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user