Skip to content

Commit

Permalink
Merge pull request frappe#21537 from vorasmit/support-timespan
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Aug 8, 2023
2 parents f818616 + b10a049 commit bc1d2bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frappe/desk/doctype/dashboard_chart/dashboard_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/widgets/chart_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit bc1d2bd

Please sign in to comment.