From 02a5c800026c0bcc26208249a0a987018dad4404 Mon Sep 17 00:00:00 2001 From: Shelby Sturgis Date: Fri, 12 Dec 2014 02:12:25 +0100 Subject: [PATCH 1/2] removing code that attempted to obtain the height of a chart to calculate the maximum truncate length for x axis labels. --- src/kibana/components/vislib/lib/x_axis.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/kibana/components/vislib/lib/x_axis.js b/src/kibana/components/vislib/lib/x_axis.js index 5b0a56169c009..0cce314e612e0 100644 --- a/src/kibana/components/vislib/lib/x_axis.js +++ b/src/kibana/components/vislib/lib/x_axis.js @@ -241,15 +241,6 @@ define(function (require) { self._attr.isRotated = false; return function (selection) { - - // maxRotatedLength = min of 60% chart height or maxRotatedLength - var chtWrap = d3.select(this.node().parentNode.parentNode.parentNode).select('.chart-wrapper'); - if (chtWrap) { - var chtWrapHt = chtWrap.style('height'); - chtWrapHt = 0.6 * +chtWrapHt.substring(0, chtWrapHt.length - 2); - maxRotatedLength = _.min([maxRotatedLength, chtWrapHt]); - } - text = selection.selectAll('.tick text'); text.each(function textWidths() { From cc3ae6e7fa69335b4749c4a830b4b1148fe772fd Mon Sep 17 00:00:00 2001 From: Shelby Sturgis Date: Fri, 12 Dec 2014 02:14:03 +0100 Subject: [PATCH 2/2] removing unused vars --- src/kibana/components/vislib/lib/x_axis.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/kibana/components/vislib/lib/x_axis.js b/src/kibana/components/vislib/lib/x_axis.js index 0cce314e612e0..fabd00c4d3e15 100644 --- a/src/kibana/components/vislib/lib/x_axis.js +++ b/src/kibana/components/vislib/lib/x_axis.js @@ -232,10 +232,8 @@ define(function (require) { var text; var barWidth = self.xScale.rangeBand(); var maxRotatedLength = 180; - var textWidth = 0; var xAxisPadding = 15; var svg; - var xAxisLabelHt = 15; var lengths = []; var length; self._attr.isRotated = false;