minor cleanup in multibar
This commit is contained in:
parent
6746682e88
commit
1a70ff5103
@ -31,7 +31,7 @@ text {
|
||||
<script>
|
||||
|
||||
//var test_data = stream_layers(3,128,.1).map(function(data, i) {
|
||||
var test_data = stream_layers(3,12,.1).map(function(data, i) {
|
||||
var test_data = stream_layers(3,128,.1).map(function(data, i) {
|
||||
return {
|
||||
key: 'Stream' + i,
|
||||
values: data
|
||||
@ -41,7 +41,7 @@ text {
|
||||
nv.addGraph({
|
||||
generate: function() {
|
||||
var width = nv.utils.windowSize().width - 40,
|
||||
height = nv.utils.windowSize().height - 40;
|
||||
height = nv.utils.windowSize().height - 40;
|
||||
|
||||
var chart = nv.models.multiBar()
|
||||
.width(width)
|
||||
|
@ -93,7 +93,7 @@ nv.models.multiBar = function() {
|
||||
.attr('transform', function(d,i) {
|
||||
return stacked ?
|
||||
'translate(0,0)'
|
||||
: 'translate(' + (i * x.rangeBand(.9) / data.length ) + ',0)'
|
||||
: 'translate(' + (i * x.rangeBand() / data.length ) + ',0)'
|
||||
});
|
||||
d3.transition(groups.exit())
|
||||
.style('stroke-opacity', 1e-6)
|
||||
@ -108,7 +108,7 @@ nv.models.multiBar = function() {
|
||||
.attr('transform', function(d,i) {
|
||||
return stacked ?
|
||||
'translate(0,0)'
|
||||
: 'translate(' + (i * x.rangeBand(.9) / data.length ) + ',0)'
|
||||
: 'translate(' + (i * x.rangeBand() / data.length ) + ',0)'
|
||||
})
|
||||
.style('stroke-opacity', 1)
|
||||
.style('fill-opacity', .5);
|
||||
|
Loading…
Reference in New Issue
Block a user