[fix] Show line graph
This commit is contained in:
parent
c72cb70393
commit
a8a378e57d
1 changed files with 5 additions and 7 deletions
|
|
@ -257,14 +257,11 @@ frappe.ui.form.Dashboard = Class.extend({
|
|||
},
|
||||
|
||||
//graphs
|
||||
add_graph: function(data, chart_type) {
|
||||
add_graph: function(data) {
|
||||
if(!data) data = {};
|
||||
var chart = c3.generate({
|
||||
bindto: '.form-graph',
|
||||
data: {
|
||||
x: 'x',
|
||||
columns: data,
|
||||
type: chart_type || 'line'
|
||||
},
|
||||
data: data,
|
||||
axis: {
|
||||
x: {
|
||||
type: 'timeseries',
|
||||
|
|
@ -283,7 +280,8 @@ frappe.ui.form.Dashboard = Class.extend({
|
|||
padding: {
|
||||
right: 30,
|
||||
bottom: 30
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.chart = chart;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue