Skip to content

Commit

Permalink
chore: fix bad types (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme authored Jun 21, 2021
1 parent b09b56e commit 1a3d777
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/charts/src/chart_types/xy_chart/domains/y_domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ function mergeYDomainForGroup(
const [{ stackMode, spec }] = dataSeries;
const groupId = getSpecDomainGroupId(spec);
const { customDomain, type, nice, desiredTickCount } = yScaleConfig[groupId];
const newCustomDomain = customDomain ? { ...customDomain } : {};
const newCustomDomain: YDomainRange = customDomain ? { ...customDomain } : {};
const { paddingUnit, padding, constrainPadding } = newCustomDomain;

let domain: ContinuousDomain;
if (stackMode === StackMode.Percentage) {
Expand Down Expand Up @@ -106,6 +107,7 @@ function mergeYDomainForGroup(
}
}
}

return {
type,
nice,
Expand All @@ -115,8 +117,8 @@ function mergeYDomainForGroup(
logBase: customDomain?.logBase,
logMinLimit: customDomain?.logMinLimit,
desiredTickCount,
domainPixelPadding: newCustomDomain.paddingUnit === DomainPaddingUnit.Pixel ? newCustomDomain.padding : 0,
constrainDomainPadding: newCustomDomain.constrainPadding,
domainPixelPadding: paddingUnit === DomainPaddingUnit.Pixel ? padding : 0,
constrainDomainPadding: constrainPadding,
};
}

Expand Down

0 comments on commit 1a3d777

Please sign in to comment.