Merge pull request #15897 from Alchez/dev-chart-options

fix: append chart options before render
This commit is contained in:
mergify[bot] 2022-02-09 10:44:04 +00:00 committed by GitHub
commit 80243d5e85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -549,14 +549,14 @@ frappe.ui.form.Dashboard = class FormDashboard {
render_graph(args) {
this.chart_area.show();
this.chart_area.body.empty();
$.extend({
$.extend(args, {
type: 'line',
colors: ['green'],
truncateLegends: 1,
axisOptions: {
shortenYAxisNumbers: 1
}
}, args);
});
this.show();
this.chart = new frappe.Chart('.form-graph', args);