mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* fix duplicate chart title * updating el to axisWrapperElement
This commit is contained in:
parent
acb42de8fc
commit
07916f0c2f
1 changed files with 7 additions and 7 deletions
|
@ -71,23 +71,23 @@ export function VislibLibLayoutLayoutProvider(Private) {
|
|||
const position = axis.axisConfig.get('position');
|
||||
const chartTitle = new ChartTitle(visConfig);
|
||||
|
||||
const el = $(this.el).find(`.axis-wrapper-${position}`);
|
||||
const axisWrapperElement = $(this.el).find(`.axis-wrapper-${position}`);
|
||||
|
||||
el.css('visibility', 'hidden');
|
||||
axisWrapperElement.css('visibility', 'hidden');
|
||||
axis.render();
|
||||
chartTitle.render();
|
||||
const width = el.width();
|
||||
const height = el.height();
|
||||
const width = axisWrapperElement.width();
|
||||
const height = axisWrapperElement.height();
|
||||
axis.destroy();
|
||||
el.find('.chart-title svg').remove();
|
||||
el.css('visibility', '');
|
||||
$(this.el).find('.chart-title svg').remove();
|
||||
axisWrapperElement.css('visibility', '');
|
||||
|
||||
|
||||
if (axis.axisConfig.isHorizontal()) {
|
||||
const spacerNodes = $(this.el).find(`.y-axis-spacer-block-${position}`);
|
||||
spacerNodes.height(`${height}px`);
|
||||
} else {
|
||||
el.find('.y-axis-div-wrapper').width(`${width}px`);
|
||||
axisWrapperElement.find('.y-axis-div-wrapper').width(`${width}px`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue