')
- .addClass('visAlert visAlert--' + type)
- .append([$icon, $text, $closeDiv]);
- $closeDiv.on('click', () => {
- $alert.remove();
- });
-
- return $alert;
- }
-
- // renders initial alerts
- render() {
- const alerts = this.alerts;
- const vis = this.vis;
-
- $(vis.element).find('.visWrapper__alerts').append($('
').addClass('visAlerts__tray'));
- if (!alerts.size()) return;
- $(vis.element).find('.visAlerts__tray').append(alerts.value());
- }
-
- // shows new alert
- show(msg, type) {
- const vis = this.vis;
- const alert = {
- msg: msg,
- type: type,
- };
- if (this.alertDefs.find((alertDef) => alertDef.msg === alert.msg)) return;
- this.alertDefs.push(alert);
- $(vis.element).find('.visAlerts__tray').append(this._addAlert(alert));
- }
-
- destroy() {
- $(this.vis.element).find('.visWrapper__alerts').remove();
- }
-}
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/binder.ts b/src/plugins/vis_types/vislib/public/vislib/lib/binder.ts
index 886745ba19563..31e49697d4bd9 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/binder.ts
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/binder.ts
@@ -33,14 +33,14 @@ export class Binder {
destroyers.forEach((fn) => fn());
}
- jqOn(el: HTMLElement, ...args: [string, (event: JQueryEventObject) => void]) {
+ jqOn(el: HTMLElement, ...args: [string, (event: JQuery.Event) => void]) {
const $el = $(el);
$el.on(...args);
this.disposal.push(() => $el.off(...args));
}
- fakeD3Bind(el: HTMLElement, event: string, handler: (event: JQueryEventObject) => void) {
- this.jqOn(el, event, (e: JQueryEventObject) => {
+ fakeD3Bind(el: HTMLElement, event: string, handler: (event: JQuery.Event) => void) {
+ this.jqOn(el, event, (e: JQuery.Event) => {
// mimic https://github.com/mbostock/d3/blob/3abb00113662463e5c19eb87cd33f6d0ddc23bc0/src/selection/on.js#L87-L94
const o = d3.event; // Events can be reentrant (e.g., focus).
d3.event = e;
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/handler.js b/src/plugins/vis_types/vislib/public/vislib/lib/handler.js
index a2b747f4d5d9c..7a68b128faf09 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/handler.js
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/handler.js
@@ -17,7 +17,6 @@ import { visTypes as chartTypes } from '../visualizations/vis_types';
import { NoResults } from '../errors';
import { Layout } from './layout/layout';
import { ChartTitle } from './chart_title';
-import { Alerts } from './alerts';
import { Axis } from './axis/axis';
import { ChartGrid as Grid } from './chart_grid';
import { Binder } from './binder';
@@ -46,7 +45,6 @@ export class Handler {
this.ChartClass = chartTypes[visConfig.get('type')];
this.uiSettings = uiSettings;
this.charts = [];
-
this.vis = vis;
this.visConfig = visConfig;
this.data = visConfig.data;
@@ -56,7 +54,6 @@ export class Handler {
.map((axisArgs) => new Axis(visConfig, axisArgs));
this.valueAxes = visConfig.get('valueAxes').map((axisArgs) => new Axis(visConfig, axisArgs));
this.chartTitle = new ChartTitle(visConfig);
- this.alerts = new Alerts(this, visConfig.get('alerts'));
this.grid = new Grid(this, visConfig.get('grid'));
if (visConfig.get('type') === 'point_series') {
@@ -69,7 +66,7 @@ export class Handler {
this.layout = new Layout(visConfig);
this.binder = new Binder();
- this.renderArray = _.filter([this.layout, this.chartTitle, this.alerts], Boolean);
+ this.renderArray = _.filter([this.layout, this.chartTitle], Boolean);
this.renderArray = this.renderArray
.concat(this.valueAxes)
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/layout/_layout.scss b/src/plugins/vis_types/vislib/public/vislib/lib/layout/_layout.scss
index 7ead0b314c7ad..4612602d93f1c 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/layout/_layout.scss
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/layout/_layout.scss
@@ -271,10 +271,6 @@
min-width: 0;
}
-.visWrapper__alerts {
- position: relative;
-}
-
// General Axes
.visAxis__column--top .axis-div svg {
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/column_layout.js b/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/column_layout.js
index e8cc0f15e89e2..02910394035f8 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/column_layout.js
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/column_layout.js
@@ -90,10 +90,6 @@ export function columnLayout(el, data) {
class: 'visWrapper__chart',
splits: chartSplit,
},
- {
- type: 'div',
- class: 'visWrapper__alerts',
- },
{
type: 'div',
class: 'visAxis--x visAxis__column--bottom',
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/gauge_layout.js b/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/gauge_layout.js
index 6b38f126232c7..e3b808b63c8c1 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/gauge_layout.js
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/layout/types/gauge_layout.js
@@ -51,10 +51,6 @@ export function gaugeLayout(el, data) {
class: 'visWrapper__chart',
splits: chartSplit,
},
- {
- type: 'div',
- class: 'visWrapper__alerts',
- },
{
type: 'div',
class: 'visAxis__splitTitles--x',
diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/vis_config.js b/src/plugins/vis_types/vislib/public/vislib/lib/vis_config.js
index 30dc2d82d4890..cc9e48897d053 100644
--- a/src/plugins/vis_types/vislib/public/vislib/lib/vis_config.js
+++ b/src/plugins/vis_types/vislib/public/vislib/lib/vis_config.js
@@ -18,7 +18,6 @@ const DEFAULT_VIS_CONFIG = {
style: {
margin: { top: 10, right: 3, bottom: 5, left: 3 },
},
- alerts: [],
categoryAxes: [],
valueAxes: [],
grid: {},
diff --git a/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx b/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
index 55955da07ebdd..731fbed7482c4 100644
--- a/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
+++ b/src/plugins/vis_types/vislib/public/vislib/partials/touchdown_template.tsx
@@ -8,6 +8,7 @@
import React from 'react';
import ReactDOM from 'react-dom/server';
+import { EuiIcon } from '@elastic/eui';
interface Props {
wholeBucket: boolean;
@@ -16,7 +17,7 @@ interface Props {
export const touchdownTemplate = ({ wholeBucket }: Props) => {
return ReactDOM.renderToStaticMarkup(
-
+
{wholeBucket ? 'Part of this bucket' : 'This area'} may contain partial data. The selected
time range does not fully cover it.
diff --git a/src/plugins/vis_types/vislib/public/vislib/visualizations/gauges/meter.js b/src/plugins/vis_types/vislib/public/vislib/visualizations/gauges/meter.js
index ad278847b0780..4073aeeed434b 100644
--- a/src/plugins/vis_types/vislib/public/vislib/visualizations/gauges/meter.js
+++ b/src/plugins/vis_types/vislib/public/vislib/visualizations/gauges/meter.js
@@ -175,7 +175,6 @@ export class MeterGauge {
const marginFactor = 0.95;
const tooltip = this.gaugeChart.tooltip;
const isTooltip = this.gaugeChart.handler.visConfig.get('addTooltip');
- const isDisplayWarning = this.gaugeChart.handler.visConfig.get('isDisplayWarning', false);
const { angleFactor, maxAngle, minAngle } =
this.gaugeConfig.gaugeType === 'Circle' ? circleAngles : arcAngles;
const maxRadius = (Math.min(width, height / angleFactor) / 2) * marginFactor;
@@ -261,7 +260,6 @@ export class MeterGauge {
.style('fill', (d) => this.getColorBucket(Math.max(min, d.y)));
const smallContainer = svg.node().getBBox().height < 70;
- let hiddenLabels = smallContainer;
// If the value label is hidden we later want to hide also all other labels
// since they don't make sense as long as the actual value is hidden.
@@ -286,7 +284,6 @@ export class MeterGauge {
// The text is too long if it's larger than the inner free space minus a couple of random pixels for padding.
const textTooLong = textLength >= getInnerFreeSpace() - 6;
if (textTooLong) {
- hiddenLabels = true;
valueLabelHidden = true;
}
return textTooLong ? 'none' : 'initial';
@@ -302,9 +299,6 @@ export class MeterGauge {
.style('display', function () {
const textLength = this.getBBox().width;
const textTooLong = textLength > maxRadius;
- if (textTooLong) {
- hiddenLabels = true;
- }
return smallContainer || textTooLong ? 'none' : 'initial';
});
@@ -317,9 +311,6 @@ export class MeterGauge {
.style('display', function () {
const textLength = this.getBBox().width;
const textTooLong = textLength > maxRadius;
- if (textTooLong) {
- hiddenLabels = true;
- }
return valueLabelHidden || smallContainer || textTooLong ? 'none' : 'initial';
});
}
@@ -335,10 +326,6 @@ export class MeterGauge {
});
}
- if (hiddenLabels && isDisplayWarning) {
- this.gaugeChart.handler.alerts.show('Some labels were hidden due to size constraints');
- }
-
//center the visualization
const transformX = width / 2;
const transformY = height / 2 > maxRadius ? height / 2 : maxRadius;
diff --git a/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/heatmap_chart.js b/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/heatmap_chart.js
index bef6c939f864a..ecab91103d614 100644
--- a/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/heatmap_chart.js
+++ b/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/heatmap_chart.js
@@ -248,7 +248,6 @@ export class HeatmapChart extends PointSeries {
};
}
- let hiddenLabels = false;
squares
.append('text')
.text((d) => zAxisFormatter(d.y))
@@ -257,9 +256,6 @@ export class HeatmapChart extends PointSeries {
const textHeight = this.getBBox().height;
const textTooLong = textLength > maxLength;
const textTooWide = textHeight > maxHeight;
- if (!d.hide && (textTooLong || textTooWide)) {
- hiddenLabels = true;
- }
return d.hide || textTooLong || textTooWide ? 'none' : 'initial';
})
.style('dominant-baseline', 'central')
@@ -278,9 +274,6 @@ export class HeatmapChart extends PointSeries {
const verticalCenter = y(d) + squareHeight / 2;
return `rotate(${rotate},${horizontalCenter},${verticalCenter})`;
});
- if (hiddenLabels) {
- this.baseChart.handler.alerts.show('Some labels were hidden due to size constraints');
- }
}
if (isTooltip) {
diff --git a/src/plugins/vis_types/vislib/tsconfig.json b/src/plugins/vis_types/vislib/tsconfig.json
index 8246b3f30646b..db00cd34203e6 100644
--- a/src/plugins/vis_types/vislib/tsconfig.json
+++ b/src/plugins/vis_types/vislib/tsconfig.json
@@ -17,7 +17,6 @@
{ "path": "../../data/tsconfig.json" },
{ "path": "../../expressions/tsconfig.json" },
{ "path": "../../visualizations/tsconfig.json" },
- { "path": "../../kibana_legacy/tsconfig.json" },
{ "path": "../../kibana_utils/tsconfig.json" },
{ "path": "../../vis_default_editor/tsconfig.json" },
{ "path": "../../vis_types/xy/tsconfig.json" },
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 34e44d37bc4b8..1b83bcac5837f 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -5628,7 +5628,6 @@
"visTypeVislib.aggResponse.allDocsTitle": "すべてのドキュメント",
"visTypeVislib.controls.gaugeOptions.alignmentLabel": "アラインメント",
"visTypeVislib.controls.gaugeOptions.autoExtendRangeLabel": "範囲を自動拡張",
- "visTypeVislib.controls.gaugeOptions.displayWarningsLabel": "警告を表示",
"visTypeVislib.controls.gaugeOptions.extendRangeTooltip": "範囲をデータの最高値に広げます。",
"visTypeVislib.controls.gaugeOptions.gaugeTypeLabel": "ゲージタイプ",
"visTypeVislib.controls.gaugeOptions.labelsTitle": "ラベル",
@@ -5639,7 +5638,6 @@
"visTypeVislib.controls.gaugeOptions.showScaleLabel": "縮尺を表示",
"visTypeVislib.controls.gaugeOptions.styleTitle": "スタイル",
"visTypeVislib.controls.gaugeOptions.subTextLabel": "サブラベル",
- "visTypeVislib.controls.gaugeOptions.switchWarningsTooltip": "警告のオン/オフを切り替えます。オンにすると、すべてのラベルを表示できない際に警告が表示されます。",
"visTypeVislib.controls.heatmapOptions.colorLabel": "色",
"visTypeVislib.controls.heatmapOptions.colorScaleLabel": "カラースケール",
"visTypeVislib.controls.heatmapOptions.colorsNumberLabel": "色の数",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index 1ec387f8f0f30..c29557eebd3f8 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -5674,7 +5674,6 @@
"visTypeVislib.aggResponse.allDocsTitle": "所有文档",
"visTypeVislib.controls.gaugeOptions.alignmentLabel": "对齐方式",
"visTypeVislib.controls.gaugeOptions.autoExtendRangeLabel": "自动扩展范围",
- "visTypeVislib.controls.gaugeOptions.displayWarningsLabel": "显示警告",
"visTypeVislib.controls.gaugeOptions.extendRangeTooltip": "将数据范围扩展到数据中的最大值。",
"visTypeVislib.controls.gaugeOptions.gaugeTypeLabel": "仪表类型",
"visTypeVislib.controls.gaugeOptions.labelsTitle": "标签",
@@ -5685,7 +5684,6 @@
"visTypeVislib.controls.gaugeOptions.showScaleLabel": "显示比例",
"visTypeVislib.controls.gaugeOptions.styleTitle": "样式",
"visTypeVislib.controls.gaugeOptions.subTextLabel": "子标签",
- "visTypeVislib.controls.gaugeOptions.switchWarningsTooltip": "打开/关闭警告。打开时,如果标签没有全部显示,则显示警告。",
"visTypeVislib.controls.heatmapOptions.colorLabel": "颜色",
"visTypeVislib.controls.heatmapOptions.colorScaleLabel": "色阶",
"visTypeVislib.controls.heatmapOptions.colorsNumberLabel": "颜色个数",