[Maps] add labels to sample data maps (#54671)
* [Maps] add count labels to sample data maps * [Maps] add labels to sample data maps * review feedback Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
040aee9fed
commit
643912e4f5
|
@ -23,12 +23,7 @@ import { RENDER_AS } from './render_as';
|
|||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { UpdateSourceEditor } from './update_source_editor';
|
||||
import { GRID_RESOLUTION } from '../../grid_resolution';
|
||||
import {
|
||||
SOURCE_DATA_ID_ORIGIN,
|
||||
ES_GEO_GRID,
|
||||
COUNT_PROP_LABEL,
|
||||
COUNT_PROP_NAME,
|
||||
} from '../../../../common/constants';
|
||||
import { SOURCE_DATA_ID_ORIGIN, ES_GEO_GRID, COUNT_PROP_NAME } from '../../../../common/constants';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { getDataSourceLabel } from '../../../../common/i18n_getters';
|
||||
import { AbstractESAggSource } from '../es_agg_source';
|
||||
|
@ -251,7 +246,6 @@ export class ESGeoGridSource extends AbstractESAggSource {
|
|||
options: {
|
||||
...defaultDynamicProperties[VECTOR_STYLES.FILL_COLOR].options,
|
||||
field: {
|
||||
label: COUNT_PROP_LABEL,
|
||||
name: COUNT_PROP_NAME,
|
||||
origin: SOURCE_DATA_ID_ORIGIN,
|
||||
},
|
||||
|
@ -275,7 +269,16 @@ export class ESGeoGridSource extends AbstractESAggSource {
|
|||
options: {
|
||||
...defaultDynamicProperties[VECTOR_STYLES.ICON_SIZE].options,
|
||||
field: {
|
||||
label: COUNT_PROP_LABEL,
|
||||
name: COUNT_PROP_NAME,
|
||||
origin: SOURCE_DATA_ID_ORIGIN,
|
||||
},
|
||||
},
|
||||
},
|
||||
[VECTOR_STYLES.LABEL_TEXT]: {
|
||||
type: DynamicStyleProperty.type,
|
||||
options: {
|
||||
...defaultDynamicProperties[VECTOR_STYLES.LABEL_TEXT].options,
|
||||
field: {
|
||||
name: COUNT_PROP_NAME,
|
||||
origin: SOURCE_DATA_ID_ORIGIN,
|
||||
},
|
||||
|
|
|
@ -17,12 +17,7 @@ import {
|
|||
VECTOR_STYLES,
|
||||
} from '../../styles/vector/vector_style_defaults';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import {
|
||||
SOURCE_DATA_ID_ORIGIN,
|
||||
ES_PEW_PEW,
|
||||
COUNT_PROP_NAME,
|
||||
COUNT_PROP_LABEL,
|
||||
} from '../../../../common/constants';
|
||||
import { SOURCE_DATA_ID_ORIGIN, ES_PEW_PEW, COUNT_PROP_NAME } from '../../../../common/constants';
|
||||
import { getDataSourceLabel } from '../../../../common/i18n_getters';
|
||||
import { convertToLines } from './convert_to_lines';
|
||||
import { Schemas } from 'ui/vis/editors/default/schemas';
|
||||
|
@ -138,7 +133,6 @@ export class ESPewPewSource extends AbstractESAggSource {
|
|||
options: {
|
||||
...defaultDynamicProperties[VECTOR_STYLES.LINE_COLOR].options,
|
||||
field: {
|
||||
label: COUNT_PROP_LABEL,
|
||||
name: COUNT_PROP_NAME,
|
||||
origin: SOURCE_DATA_ID_ORIGIN,
|
||||
},
|
||||
|
@ -150,7 +144,6 @@ export class ESPewPewSource extends AbstractESAggSource {
|
|||
options: {
|
||||
...defaultDynamicProperties[VECTOR_STYLES.LINE_WIDTH].options,
|
||||
field: {
|
||||
label: COUNT_PROP_LABEL,
|
||||
name: COUNT_PROP_NAME,
|
||||
origin: SOURCE_DATA_ID_ORIGIN,
|
||||
},
|
||||
|
|
|
@ -39,7 +39,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'count of kibana_sample_data_ecommerce:geoip.country_iso_code',
|
||||
name: '__kbnjoin__count_groupby_kibana_sample_data_ecommerce.geoip.country_iso_code',
|
||||
origin: 'join',
|
||||
},
|
||||
|
@ -104,7 +103,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'count of kibana_sample_data_ecommerce:geoip.region_name',
|
||||
name: '__kbnjoin__count_groupby_kibana_sample_data_ecommerce.geoip.region_name',
|
||||
origin: 'join',
|
||||
},
|
||||
|
@ -169,7 +167,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'count of kibana_sample_data_ecommerce:geoip.region_name',
|
||||
name: '__kbnjoin__count_groupby_kibana_sample_data_ecommerce.geoip.region_name',
|
||||
origin: 'join',
|
||||
},
|
||||
|
@ -234,7 +231,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'count of kibana_sample_data_ecommerce:geoip.region_name',
|
||||
name: '__kbnjoin__count_groupby_kibana_sample_data_ecommerce.geoip.region_name',
|
||||
origin: 'join',
|
||||
},
|
||||
|
@ -314,7 +310,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'taxful_total_price',
|
||||
name: 'taxful_total_price',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -376,7 +371,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'Count',
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -399,7 +393,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'sum of taxful_total_price',
|
||||
name: 'sum_of_taxful_total_price',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -407,6 +400,31 @@ const layerList = [
|
|||
maxSize: 20,
|
||||
},
|
||||
},
|
||||
labelText: {
|
||||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
name: 'sum_of_taxful_total_price',
|
||||
origin: 'source',
|
||||
},
|
||||
},
|
||||
},
|
||||
labelSize: {
|
||||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
name: 'sum_of_taxful_total_price',
|
||||
origin: 'source',
|
||||
},
|
||||
minSize: 12,
|
||||
maxSize: 24,
|
||||
},
|
||||
},
|
||||
labelBorderSize: {
|
||||
options: {
|
||||
size: 'MEDIUM',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
type: 'VECTOR',
|
||||
|
|
|
@ -54,7 +54,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'FlightTimeMin',
|
||||
name: 'FlightTimeMin',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -77,7 +76,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'DistanceMiles',
|
||||
name: 'DistanceMiles',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -122,7 +120,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'Count',
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -145,7 +142,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'avg of FlightTimeMin',
|
||||
name: 'avg_of_FlightTimeMin',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -190,7 +186,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'Count',
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -213,7 +208,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'avg of FlightDelayMin',
|
||||
name: 'avg_of_FlightDelayMin',
|
||||
origin: 'source',
|
||||
},
|
||||
|
|
|
@ -39,7 +39,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'count of kibana_sample_data_logs:geo.src',
|
||||
name: '__kbnjoin__count_groupby_kibana_sample_data_logs.geo.src',
|
||||
origin: 'join',
|
||||
},
|
||||
|
@ -135,7 +134,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'bytes',
|
||||
name: 'bytes',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -179,7 +177,6 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'Count',
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
|
@ -202,14 +199,33 @@ const layerList = [
|
|||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
label: 'sum of bytes',
|
||||
name: 'sum_of_bytes',
|
||||
origin: 'source',
|
||||
},
|
||||
minSize: 1,
|
||||
minSize: 7,
|
||||
maxSize: 25,
|
||||
},
|
||||
},
|
||||
labelText: {
|
||||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
},
|
||||
},
|
||||
labelSize: {
|
||||
type: 'DYNAMIC',
|
||||
options: {
|
||||
field: {
|
||||
name: 'doc_count',
|
||||
origin: 'source',
|
||||
},
|
||||
minSize: 12,
|
||||
maxSize: 24,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
type: 'VECTOR',
|
||||
|
|
Loading…
Reference in a new issue