mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Maps] coerce string doc-values to numbers if used in styling (#33657)
This commit is contained in:
parent
4d60e86287
commit
41d4172fe5
1 changed files with 2 additions and 2 deletions
|
@ -227,9 +227,9 @@ export class VectorStyle extends AbstractStyle {
|
|||
|
||||
//scale to [0,1] domain
|
||||
for (let i = 0; i < features.length; i++) {
|
||||
const unscaledValue = features[i].properties[fieldName];
|
||||
const unscaledValue = parseFloat(features[i].properties[fieldName]);
|
||||
let scaledValue;
|
||||
if (typeof unscaledValue !== 'number' || isNaN(unscaledValue)) {//cannot scale
|
||||
if (isNaN(unscaledValue)) {//cannot scale
|
||||
scaledValue = -1;//put outside range
|
||||
} else if (diff === 0) {//values are identical
|
||||
scaledValue = 1;//snap to end of color range
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue