mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #4127 from stormpython/fix/chart_titles
Fix vanishing chart titles when charts are split.
This commit is contained in:
commit
a15d0f25ce
1 changed files with 8 additions and 5 deletions
|
@ -108,11 +108,16 @@ define(function (require) {
|
||||||
div.append('svg')
|
div.append('svg')
|
||||||
.attr('width', function () {
|
.attr('width', function () {
|
||||||
if (dataType === 'rows') {
|
if (dataType === 'rows') {
|
||||||
return 15;
|
return height;
|
||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
})
|
})
|
||||||
.attr('height', height)
|
.attr('height', function () {
|
||||||
|
if (dataType === 'rows') {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
return height;
|
||||||
|
})
|
||||||
.append('text')
|
.append('text')
|
||||||
.attr('transform', function () {
|
.attr('transform', function () {
|
||||||
if (dataType === 'rows') {
|
if (dataType === 'rows') {
|
||||||
|
@ -121,9 +126,7 @@ define(function (require) {
|
||||||
return 'translate(' + width / 2 + ',' + txtHtOffset + ')';
|
return 'translate(' + width / 2 + ',' + txtHtOffset + ')';
|
||||||
})
|
})
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.text(function (d) {
|
.text(function (d) { return d.label; });
|
||||||
return d.label;
|
|
||||||
});
|
|
||||||
|
|
||||||
// truncate long chart titles
|
// truncate long chart titles
|
||||||
div.selectAll('text')
|
div.selectAll('text')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue