Skip to content

Commit

Permalink
[Bug] Object and array field types made numeric (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorDykhta committed Feb 14, 2023
1 parent 31e4435 commit 20fcb66
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/constants/src/default-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,22 +647,16 @@ export const FIELD_OPTS = {
}
},
[ALL_FIELD_TYPES.object]: {
type: 'categorical',
scale: {
...ordinalFieldScaleFunctions,
...ordinalFieldAggrScaleFunctions
},
type: 'numerical',
scale: {},
format: {
legend: d => '...',
tooltip: []
}
},
[ALL_FIELD_TYPES.array]: {
type: 'categorical',
scale: {
...ordinalFieldScaleFunctions,
...ordinalFieldAggrScaleFunctions
},
type: 'numerical',
scale: {},
format: {
legend: d => '...',
tooltip: []
Expand All @@ -673,7 +667,9 @@ export const FIELD_OPTS = {
export const CHANNEL_SCALE_SUPPORTED_FIELDS = Object.keys(CHANNEL_SCALES).reduce(
(accu, key) => ({
...accu,
[key]: Object.keys(FIELD_OPTS).filter(ft => Object.keys(FIELD_OPTS[ft].scale[key]).length)
[key]: Object.keys(FIELD_OPTS).filter(
ft => FIELD_OPTS[ft].scale[key] && Object.keys(FIELD_OPTS[ft].scale[key]).length
)
}),
{} as {[id: string]: string[]}
);
Expand Down

0 comments on commit 20fcb66

Please sign in to comment.