Skip to content

Commit

Permalink
fix: typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taeyma41 committed Apr 21, 2023
1 parent b165367 commit b2bd91b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/demo-app/src/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/common/color-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ export default class ColorLegend extends Component {
}

const scaleFunction = SCALE_FUNC[scaleType];
// color scale can only be quantize, quantile, treshold or ordinal
// color scale can only be quantize, quantile, threshold or ordinal
// @ts-ignore fix d3 scale
let scale = scaleFunction()
.domain(domain)
.range(range.colors);

if (scaleType === SCALE_TYPES.treshold && range.ranges) {
if (scaleType === SCALE_TYPES.threshold && range.ranges) {
// @ts-ignore fix d3 scale
scale = scaleFunction()
.domain(range.ranges)
Expand Down
6 changes: 3 additions & 3 deletions src/constants/default-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export const SCALE_TYPES = keyMirror({

// ordinal domain to linear range
point: null,
treshold: null
threshold: null
});

export const SCALE_FUNC = {
Expand All @@ -320,7 +320,7 @@ export const SCALE_FUNC = {
[SCALE_TYPES.sqrt]: scaleSqrt,
[SCALE_TYPES.log]: scaleLog,
[SCALE_TYPES.point]: scalePoint,
[SCALE_TYPES.treshold]: scaleThreshold
[SCALE_TYPES.threshold]: scaleThreshold
};

export const ALL_FIELD_TYPES = keyMirror({
Expand Down Expand Up @@ -453,7 +453,7 @@ export const AGGREGATION_TYPES = {
};

export const linearFieldScaleFunctions = {
[CHANNEL_SCALES.color]: [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.treshold],
[CHANNEL_SCALES.color]: [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.threshold],
[CHANNEL_SCALES.radius]: [SCALE_TYPES.sqrt],
[CHANNEL_SCALES.size]: [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]
};
Expand Down
4 changes: 2 additions & 2 deletions src/layers/base-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,9 @@ class Layer {
return scale;
}

if (colorScale === 'treshold') {
if (colorScale === 'threshold') {
return this.getVisChannelScale(
'treshold',
'threshold',
colorRange.ranges ? colorRange.ranges : colorDomain,
colorRange.colors.map(hexToRgb)
);
Expand Down
2 changes: 1 addition & 1 deletion src/layers/float-bitmap-layer/float-bitmap-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class FloatBitmapLayer extends Layer {
getDefaultLayerConfig(props = {}) {
return {
...super.getDefaultLayerConfig(props),
colorScale: 'treshold'
colorScale: 'threshold'
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/table-utils/kepler-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class KeplerTable {
return getOrdinalDomain(dataContainer, valueAccessor);

case SCALE_TYPES.quantile:
case SCALE_TYPES.treshold:
case SCALE_TYPES.threshold:
return getQuantileDomain(filteredIndexForDomain, indexValueAccessor, sortFunction);

case SCALE_TYPES.log:
Expand Down

0 comments on commit b2bd91b

Please sign in to comment.