Skip to content

Commit

Permalink
fix: incorrect default table calc type (#9888)
Browse files Browse the repository at this point in the history
  • Loading branch information
magnew committed Apr 25, 2024
1 parent de0dfb1 commit 3ddaa89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/compiler/filtersCompiler.ts
Expand Up @@ -347,7 +347,7 @@ export const renderTableCalculationFilterRuleSql = (
case TableCalculationType.BOOLEAN:
return renderBooleanFilterSql(fieldSql, filterRule);
default:
// Try with format.type for backwards compatibility
// Do nothing here. This will try with format.type for backwards compatibility
}

switch (field.format?.type) {
Expand Down
Expand Up @@ -79,6 +79,7 @@ const getLabelFromField = (fields: ItemsMap, key: string | undefined) => {

const getAxisTypeFromField = (item?: ItemsMap[string]): string => {
if (item && isCustomDimension(item)) return 'category';
if (item && isTableCalculation(item) && !item.type) return 'value';
if (item && (isField(item) || isTableCalculation(item))) {
switch (item.type) {
case TableCalculationType.NUMBER:
Expand Down

0 comments on commit 3ddaa89

Please sign in to comment.