[fix] heatmap data
This commit is contained in:
parent
008d1f376b
commit
45e539fdc0
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@ -1,10 +1,10 @@
|
||||
#### Expected Behviour
|
||||
#### Expected Behaviour
|
||||
|
||||
#### Actual Behaviour
|
||||
|
||||
#### Steps to Reproduce:
|
||||
*
|
||||
*
|
||||
|
||||
NOTE: Add a GIF/Screenshot if required.
|
||||
|
||||
Frappé Charts version:
|
||||
Frappé Charts version:
|
||||
|
||||
2
dist/frappe-charts.min.js
vendored
2
dist/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/frappe-charts.min.js.map
vendored
2
dist/frappe-charts.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/frappe-charts.min.js
vendored
2
docs/assets/js/frappe-charts.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -373,24 +373,20 @@ Array.prototype.slice.call(
|
||||
el.addEventListener('click', (e) => {
|
||||
let btn = e.target;
|
||||
let mode = btn.getAttribute('data-mode');
|
||||
let discrete_domains = 0;
|
||||
|
||||
if(mode === 'discrete') {
|
||||
new Chart({
|
||||
parent: "#chart-heatmap",
|
||||
data: heatmap_data,
|
||||
type: 'heatmap',
|
||||
height: 100,
|
||||
discrete_domains: 1 // default 0
|
||||
});
|
||||
} else {
|
||||
new Chart({
|
||||
parent: "#chart-heatmap",
|
||||
data: heatmap_data,
|
||||
type: 'heatmap',
|
||||
height: 100
|
||||
});
|
||||
discrete_domains = 1;
|
||||
}
|
||||
|
||||
new Chart({
|
||||
parent: "#chart-heatmap",
|
||||
data: heatmap_data,
|
||||
type: 'heatmap',
|
||||
height: 115,
|
||||
discrete_domains: discrete_domains
|
||||
});
|
||||
|
||||
Array.prototype.slice.call(
|
||||
btn.parentNode.querySelectorAll('button')).map(el => {
|
||||
el.classList.remove('active');
|
||||
|
||||
@ -48,7 +48,7 @@ export default class Heatmap extends BaseChart {
|
||||
}
|
||||
|
||||
set_width() {
|
||||
this.base_width = (this.no_of_cols) * 12;
|
||||
this.base_width = (this.no_of_cols + 3) * 12 ;
|
||||
|
||||
if(this.discrete_domains) {
|
||||
this.base_width += (12 * 12);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user