@@ -98,6 +98,10 @@ | |||||
.form-dashboard-section:last-child { | .form-dashboard-section:last-child { | ||||
border-bottom: none; | border-bottom: none; | ||||
} | } | ||||
.form-heatmap .heatmap { | |||||
display: flex; | |||||
justify-content: center; | |||||
} | |||||
.form-heatmap .heatmap-message { | .form-heatmap .heatmap-message { | ||||
margin-top: 10px; | margin-top: 10px; | ||||
} | } | ||||
@@ -338,7 +338,7 @@ frappe.ui.form.Dashboard = Class.extend({ | |||||
parent: this.heatmap_area.find("#heatmap-" + frappe.model.scrub(this.frm.doctype)), | parent: this.heatmap_area.find("#heatmap-" + frappe.model.scrub(this.frm.doctype)), | ||||
height: 100, | height: 100, | ||||
start: new Date(moment().subtract(1, 'year').toDate()), | start: new Date(moment().subtract(1, 'year').toDate()), | ||||
discrete_domains: 1 | |||||
discrete_domains: 0 | |||||
}); | }); | ||||
// center the heatmap | // center the heatmap | ||||
@@ -2,7 +2,7 @@ | |||||
<div class="progress-area hidden form-dashboard-section"> | <div class="progress-area hidden form-dashboard-section"> | ||||
</div> | </div> | ||||
<div class="form-heatmap hidden form-dashboard-section"> | <div class="form-heatmap hidden form-dashboard-section"> | ||||
<div id="heatmap-{{ frappe.model.scrub(frm.doctype) }}"></div> | |||||
<div id="heatmap-{{ frappe.model.scrub(frm.doctype) }}" class="heatmap"></div> | |||||
<div class="text-muted small heatmap-message hidden"></div> | <div class="text-muted small heatmap-message hidden"></div> | ||||
</div> | </div> | ||||
<div class="form-graph form-dashboard-section hidden"></div> | <div class="form-graph form-dashboard-section hidden"></div> | ||||
@@ -649,7 +649,7 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph { | |||||
} | } | ||||
set_width() { | set_width() { | ||||
this.base_width = (this.no_of_cols + 14) * 12; | |||||
this.base_width = (this.no_of_cols) * 12; | |||||
} | } | ||||
setup_components() { | setup_components() { | ||||
@@ -136,6 +136,11 @@ | |||||
.form-heatmap { | .form-heatmap { | ||||
.heatmap { | |||||
display: flex; | |||||
justify-content: center; | |||||
} | |||||
.heatmap-message { | .heatmap-message { | ||||
margin-top: 10px; | margin-top: 10px; | ||||
} | } | ||||