Skip to content

Commit

Permalink
steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Nov 19, 2021
1 parent df66bc9 commit ec6359c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function GaugeDimensionEditor(
params: {
...defaultPaletteParams,
stops: undefined,
colorStops: undefined,
rangeMin: currentMinMax.min,
rangeMax: (currentMinMax.max * 3) / 4,
},
Expand Down Expand Up @@ -95,10 +94,7 @@ export function GaugeDimensionEditor(
...activePalette,
params: {
...activePalette.params,
stops: displayStops.map((v, i, array) => ({
...v,
stop: i === 0 ? currentMinMax.min : array[i - 1].stop,
})),
stops: displayStops,
},
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { RequiredPaletteParamTypes } from '../../../common';
import { defaultPaletteParams as sharedDefaultParams } from '../../shared_components/';

export const DEFAULT_PALETTE_NAME = 'gray';
export const DEFAULT_PALETTE_NAME = 'custom';
export const DEFAULT_COLOR_STEPS = 3;
export const DEFAULT_MIN_STOP = 0;
export const DEFAULT_MAX_STOP = 100;
Expand All @@ -19,4 +19,10 @@ export const defaultPaletteParams: RequiredPaletteParamTypes = {
rangeMax: DEFAULT_MAX_STOP,
name: DEFAULT_PALETTE_NAME,
steps: DEFAULT_COLOR_STEPS,
maxSteps: 5,
colorStops: [
{ color: '#D6DBE4', stop: 0 },
{ color: '#AFB8C6', stop: 33.33 },
{ color: '#8C95A5', stop: 66.66 },
],
};

0 comments on commit ec6359c

Please sign in to comment.