Browse Source

[heatmap] choose continuous for dashboard

version-14
pratu16x7 7 years ago
parent
commit
2b200bcf7f
5 changed files with 12 additions and 3 deletions
  1. +4
    -0
      frappe/public/css/form.css
  2. +1
    -1
      frappe/public/js/frappe/form/dashboard.js
  3. +1
    -1
      frappe/public/js/frappe/form/templates/form_dashboard.html
  4. +1
    -1
      frappe/public/js/frappe/ui/graphs.js
  5. +5
    -0
      frappe/public/less/form.less

+ 4
- 0
frappe/public/css/form.css View File

@@ -98,6 +98,10 @@
.form-dashboard-section:last-child {
border-bottom: none;
}
.form-heatmap .heatmap {
display: flex;
justify-content: center;
}
.form-heatmap .heatmap-message {
margin-top: 10px;
}


+ 1
- 1
frappe/public/js/frappe/form/dashboard.js View File

@@ -338,7 +338,7 @@ frappe.ui.form.Dashboard = Class.extend({
parent: this.heatmap_area.find("#heatmap-" + frappe.model.scrub(this.frm.doctype)),
height: 100,
start: new Date(moment().subtract(1, 'year').toDate()),
discrete_domains: 1
discrete_domains: 0
});

// center the heatmap


+ 1
- 1
frappe/public/js/frappe/form/templates/form_dashboard.html View File

@@ -2,7 +2,7 @@
<div class="progress-area hidden form-dashboard-section">
</div>
<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>
<div class="form-graph form-dashboard-section hidden"></div>


+ 1
- 1
frappe/public/js/frappe/ui/graphs.js View File

@@ -649,7 +649,7 @@ frappe.ui.HeatMap = class HeatMap extends frappe.ui.Graph {
}

set_width() {
this.base_width = (this.no_of_cols + 14) * 12;
this.base_width = (this.no_of_cols) * 12;
}

setup_components() {


+ 5
- 0
frappe/public/less/form.less View File

@@ -136,6 +136,11 @@

.form-heatmap {

.heatmap {
display: flex;
justify-content: center;
}

.heatmap-message {
margin-top: 10px;
}


Loading…
Cancel
Save