* [APM] Adds chart for page load averages by country in RUM page-load view * [APM] Simplified and refined ChoroplethMap. Added legend labels. * - Replaced Map legend slices with smooth gradient - fixed issue with map rendering multiple times - renamed initial props to start with 'initial' - added some more code comments * use correct i18n ids * - base color progression calc directly on euiColorPrimary - check that a layer exists before querying features * Addressed code review feedback * - fixes issue where min/max was not a finite value - cleans up mouseover handler, which updates on state changes - formats doc count for display - style improvements * addressed PR feedback & updated renovate.json5 * - Removed the Legend from the ChoroplethMap - Only render tooltip when there's data * - fix hover state not clearing properly - add better typing around Geojson propertier for world countries * added missing css import
18 lines
900 B
JavaScript
18 lines
900 B
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
// bluebird < v3.3.5 does not work with MutationObserver polyfill
|
|
// when MutationObserver exists, bluebird avoids using node's builtin async schedulers
|
|
// x-pack has a different version of bluebird so it needs its own polyfills.js to ensure
|
|
// the scheduler is set on the right bluebird instance
|
|
const bluebird = require('bluebird');
|
|
bluebird.Promise.setScheduler(function (fn) { global.setImmediate.call(global, fn); });
|
|
|
|
const MutationObserver = require('mutation-observer');
|
|
Object.defineProperty(window, 'MutationObserver', { value: MutationObserver });
|
|
|
|
const URL = { createObjectURL: () => '' };
|
|
Object.defineProperty(window, 'URL', { value: URL });
|