[fix] Show line graph

This commit is contained in:
Nabin Hait 2016-04-28 18:17:10 +05:30
parent c72cb70393
commit a8a378e57d

View file

@ -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;