[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
|
#### Actual Behaviour
|
||||||
|
|
||||||
#### Steps to Reproduce:
|
#### Steps to Reproduce:
|
||||||
*
|
*
|
||||||
|
|
||||||
NOTE: Add a GIF/Screenshot if required.
|
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) => {
|
el.addEventListener('click', (e) => {
|
||||||
let btn = e.target;
|
let btn = e.target;
|
||||||
let mode = btn.getAttribute('data-mode');
|
let mode = btn.getAttribute('data-mode');
|
||||||
|
let discrete_domains = 0;
|
||||||
|
|
||||||
if(mode === 'discrete') {
|
if(mode === 'discrete') {
|
||||||
new Chart({
|
discrete_domains = 1;
|
||||||
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
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new Chart({
|
||||||
|
parent: "#chart-heatmap",
|
||||||
|
data: heatmap_data,
|
||||||
|
type: 'heatmap',
|
||||||
|
height: 115,
|
||||||
|
discrete_domains: discrete_domains
|
||||||
|
});
|
||||||
|
|
||||||
Array.prototype.slice.call(
|
Array.prototype.slice.call(
|
||||||
btn.parentNode.querySelectorAll('button')).map(el => {
|
btn.parentNode.querySelectorAll('button')).map(el => {
|
||||||
el.classList.remove('active');
|
el.classList.remove('active');
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export default class Heatmap extends BaseChart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_width() {
|
set_width() {
|
||||||
this.base_width = (this.no_of_cols) * 12;
|
this.base_width = (this.no_of_cols + 3) * 12 ;
|
||||||
|
|
||||||
if(this.discrete_domains) {
|
if(this.discrete_domains) {
|
||||||
this.base_width += (12 * 12);
|
this.base_width += (12 * 12);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user