fix: dont override default report options in charts
Sales analytics and purchase analytics reports are clearing the default options which includes number shortening, axis options etc. This makes report unreadable when dealing with large numbers.
This commit is contained in:
parent
d7446fd3ae
commit
ceeea6180e
@ -130,11 +130,8 @@ frappe.query_reports["Purchase Analytics"] = {
|
|||||||
labels: raw_data.labels,
|
labels: raw_data.labels,
|
||||||
datasets: new_datasets,
|
datasets: new_datasets,
|
||||||
};
|
};
|
||||||
chart_options = {
|
const new_options = Object.assign({}, frappe.query_report.chart_options, {data: new_data});
|
||||||
data: new_data,
|
frappe.query_report.render_chart(new_options);
|
||||||
type: "line",
|
|
||||||
};
|
|
||||||
frappe.query_report.render_chart(chart_options);
|
|
||||||
|
|
||||||
frappe.query_report.raw_chart_data = new_data;
|
frappe.query_report.raw_chart_data = new_data;
|
||||||
},
|
},
|
||||||
|
@ -109,11 +109,8 @@ frappe.query_reports["Sales Analytics"] = {
|
|||||||
labels: raw_data.labels,
|
labels: raw_data.labels,
|
||||||
datasets: new_datasets,
|
datasets: new_datasets,
|
||||||
};
|
};
|
||||||
|
const new_options = Object.assign({}, frappe.query_report.chart_options, {data: new_data});
|
||||||
frappe.query_report.render_chart({
|
frappe.query_report.render_chart(new_options);
|
||||||
data: new_data,
|
|
||||||
type: "line",
|
|
||||||
});
|
|
||||||
|
|
||||||
frappe.query_report.raw_chart_data = new_data;
|
frappe.query_report.raw_chart_data = new_data;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user