fix: run yarn format

This commit is contained in:
NunoSempere 2022-06-24 12:22:09 -04:00
parent 872204d38e
commit be8edcba13
3 changed files with 31 additions and 23 deletions

View File

@ -54,28 +54,33 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
React.useEffect(() => setExpY(expY), [expY]);
const [sized] = useSize((size) => {
const p3wrapped = distribution.inv(0.025);
const p97wrapped = distribution.inv(0.975);
if (p3wrapped.tag == "Error") {
return <ErrorAlert heading="Distribution Calculation Error">
return (
<ErrorAlert heading="Distribution Calculation Error">
{distributionErrorToString(p3wrapped.value)}
</ErrorAlert>
);
} else if (p97wrapped.tag == "Error") {
return <ErrorAlert heading="Distribution Calculation Error">
return (
<ErrorAlert heading="Distribution Calculation Error">
{distributionErrorToString(p97wrapped.value)}
</ErrorAlert>
);
}
const p3 = p3wrapped.value
const p97 = p97wrapped.value
const p3 = p3wrapped.value;
const p97 = p97wrapped.value;
const truncatedDistributionWrapper = distribution.truncate(p3, p97)
const truncatedDistributionWrapper = distribution.truncate(p3, p97);
if (truncatedDistributionWrapper.tag == "Error") {
return <ErrorAlert heading="Distribution Truncation For Display Error">
return (
<ErrorAlert heading="Distribution Truncation For Display Error">
{distributionErrorToString(truncatedDistributionWrapper.value)}
</ErrorAlert>
);
}
const truncatedDistribution = truncatedDistributionWrapper.value
const truncatedDistribution = truncatedDistributionWrapper.value;
const shape = distribution.pointSet();
const shapeTruncated = truncatedDistribution.pointSet(); // distribution.pointSet();
@ -115,8 +120,11 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
<Vega
spec={spec}
data={
truncateTo95ci ?
{ con: shapeTruncated.value.continuous, dis: shapeTruncated.value.discrete }
truncateTo95ci
? {
con: shapeTruncated.value.continuous,
dis: shapeTruncated.value.discrete,
}
: { con: shape.value.continuous, dis: shape.value.discrete }
}
width={widthProp - 10}

View File

@ -104,7 +104,7 @@ export const SquiggleEditor: React.FC<SquiggleEditorProps> = ({
showSummary,
logX,
expY,
truncateTo95ci
truncateTo95ci,
};
return (