Skip to content

Commit dbeb780

Browse files
committed
making radius work wit min and max
1 parent 19ed962 commit dbeb780

File tree

1 file changed

+10
-1
lines changed
  • packages/base/src/dialogs/symbology/vector_layer/types

1 file changed

+10
-1
lines changed

packages/base/src/dialogs/symbology/vector_layer/types/Graduated.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,16 @@ const Graduated: React.FC<ISymbologyTabbedDialogWithAttributesProps> = ({
285285

286286
const stopOutputPairs =
287287
symbologyTab === 'radius'
288-
? stops.map(v => ({ stop: v, output: v }))
288+
? stops.map(v => {
289+
const scaled =
290+
minValue !== undefined && maxValue !== undefined
291+
? minValue +
292+
((v - Math.min(...stops)) /
293+
(Math.max(...stops) - Math.min(...stops))) *
294+
(maxValue - minValue)
295+
: v;
296+
return { stop: scaled, output: scaled };
297+
})
289298
: Utils.getValueColorPairs(
290299
stops,
291300
selectedRamp,

0 commit comments

Comments
 (0)