Skip to content

Commit

Permalink
default countable scale
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Feb 10, 2020
1 parent dc41c1d commit a5163f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion x-pack/legacy/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const SORT_ORDER = {
DESC: 'desc',
};

//sources
// sources
export const EMS_TMS = 'EMS_TMS';
export const EMS_FILE = 'EMS_FILE';
export const ES_GEO_GRID = 'ES_GEO_GRID';
Expand Down Expand Up @@ -168,3 +168,5 @@ export const SYMBOLIZE_AS_TYPES = {
};

export const DEFAULT_ICON = 'airfield';

export const DEFAULT_COUNTABLE_SCALE = 2048;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
import _ from 'lodash';
import { AbstractStyleProperty } from './style_property';
import { DEFAULT_SIGMA } from '../vector_style_defaults';
import { COLOR_PALETTE_MAX_SIZE, STYLE_TYPE } from '../../../../../common/constants';
import {
COLOR_PALETTE_MAX_SIZE,
DEFAULT_COUNTABLE_SCALE,
STYLE_TYPE,
} from '../../../../../common/constants';
import { scaleValue, getComputedFieldName } from '../style_util';
import React from 'react';
import { OrdinalLegend } from './components/ordinal_legend';
Expand Down Expand Up @@ -182,7 +186,7 @@ export class DynamicStyleProperty extends AbstractStyleProperty {

if (fieldMetaData.type_count && typeof fieldMetaData.type_count.value === 'number') {
const min = 0;
const max = Math.ceil(fieldMetaData.type_count.value / 1024);
const max = Math.ceil(fieldMetaData.type_count.value / DEFAULT_COUNTABLE_SCALE);
return {
min: min,
max: max,
Expand Down

0 comments on commit a5163f6

Please sign in to comment.