Merge pull request #21537 from vorasmit/support-timespan

This commit is contained in:
Shariq Ansari 2023-08-08 23:45:33 +05:30 committed by GitHub
commit bc1d2bd20b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -107,6 +107,8 @@ frappe.ui.form.on("Dashboard Chart", {
// set timeseries based on chart type
if (["Count", "Average", "Sum"].includes(frm.doc.chart_type)) {
frm.set_value("timeseries", 1);
} else if (frm.doc.chart_type == "Custom") {
return;
} else {
frm.set_value("timeseries", 0);
}

View file

@ -103,7 +103,7 @@ export default class ChartWidget extends Widget {
this.action_area.empty();
this.prepare_chart_actions();
if (this.chart_doc.timeseries && this.chart_doc.chart_type !== "Custom") {
if (this.chart_doc.timeseries) {
this.render_time_series_filters();
}
}