Merge pull request #4127 from stormpython/fix/chart_titles

Fix vanishing chart titles when charts are split.
This commit is contained in:
Lukas Olson 2015-06-05 11:54:43 -07:00
commit a15d0f25ce

View file

@ -108,11 +108,16 @@ define(function (require) {
div.append('svg')
.attr('width', function () {
if (dataType === 'rows') {
return 15;
return height;
}
return width;
})
.attr('height', height)
.attr('height', function () {
if (dataType === 'rows') {
return width;
}
return height;
})
.append('text')
.attr('transform', function () {
if (dataType === 'rows') {
@ -121,9 +126,7 @@ define(function (require) {
return 'translate(' + width / 2 + ',' + txtHtOffset + ')';
})
.attr('text-anchor', 'middle')
.text(function (d) {
return d.label;
});
.text(function (d) { return d.label; });
// truncate long chart titles
div.selectAll('text')