mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-14 08:28:40 +00:00
Make chart cell size dynamic
This commit is contained in:
parent
d7f317c815
commit
234ab60a26
|
|
@ -11,7 +11,6 @@
|
||||||
this.chart.color = d3.scale.quantize()
|
this.chart.color = d3.scale.quantize()
|
||||||
.domain([-.05, .05])
|
.domain([-.05, .05])
|
||||||
.range(d3.range(11).map(function(d) { return "q" + d + "-11"; }));
|
.range(d3.range(11).map(function(d) { return "q" + d + "-11"; }));
|
||||||
this.chart.cellSize = 17;
|
|
||||||
|
|
||||||
this.chart.subtype = 'calendar';
|
this.chart.subtype = 'calendar';
|
||||||
};
|
};
|
||||||
|
|
@ -38,6 +37,8 @@
|
||||||
height: box.height
|
height: box.height
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.chart.cellSize = Math.min(this.chart.dimension.width / (12*5), this.chart.dimension.height / (8));
|
||||||
|
|
||||||
document.getElementById(this.chart.chartId).style.height = (this.chart.dimension.height * this.chart.dataset.length) + 'px';
|
document.getElementById(this.chart.chartId).style.height = (this.chart.dimension.height * this.chart.dataset.length) + 'px';
|
||||||
|
|
||||||
svg = this.chart.chartSelect.selectAll('svg').data(this.chart.dataset).enter().append("svg")
|
svg = this.chart.chartSelect.selectAll('svg').data(this.chart.dataset).enter().append("svg")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user