[fix] heatmap data

This commit is contained in:
pratu16x7 2017-11-03 22:47:20 +05:30
parent 008d1f376b
commit 45e539fdc0
7 changed files with 18 additions and 22 deletions

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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