fix: run yarn format
This commit is contained in:
parent
872204d38e
commit
be8edcba13
|
@ -54,28 +54,33 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
|
||||||
React.useEffect(() => setExpY(expY), [expY]);
|
React.useEffect(() => setExpY(expY), [expY]);
|
||||||
|
|
||||||
const [sized] = useSize((size) => {
|
const [sized] = useSize((size) => {
|
||||||
|
|
||||||
const p3wrapped = distribution.inv(0.025);
|
const p3wrapped = distribution.inv(0.025);
|
||||||
const p97wrapped = distribution.inv(0.975);
|
const p97wrapped = distribution.inv(0.975);
|
||||||
if (p3wrapped.tag == "Error") {
|
if (p3wrapped.tag == "Error") {
|
||||||
return <ErrorAlert heading="Distribution Calculation Error">
|
return (
|
||||||
|
<ErrorAlert heading="Distribution Calculation Error">
|
||||||
{distributionErrorToString(p3wrapped.value)}
|
{distributionErrorToString(p3wrapped.value)}
|
||||||
</ErrorAlert>
|
</ErrorAlert>
|
||||||
|
);
|
||||||
} else if (p97wrapped.tag == "Error") {
|
} else if (p97wrapped.tag == "Error") {
|
||||||
return <ErrorAlert heading="Distribution Calculation Error">
|
return (
|
||||||
|
<ErrorAlert heading="Distribution Calculation Error">
|
||||||
{distributionErrorToString(p97wrapped.value)}
|
{distributionErrorToString(p97wrapped.value)}
|
||||||
</ErrorAlert>
|
</ErrorAlert>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
const p3 = p3wrapped.value
|
const p3 = p3wrapped.value;
|
||||||
const p97 = p97wrapped.value
|
const p97 = p97wrapped.value;
|
||||||
|
|
||||||
const truncatedDistributionWrapper = distribution.truncate(p3, p97)
|
const truncatedDistributionWrapper = distribution.truncate(p3, p97);
|
||||||
if (truncatedDistributionWrapper.tag == "Error") {
|
if (truncatedDistributionWrapper.tag == "Error") {
|
||||||
return <ErrorAlert heading="Distribution Truncation For Display Error">
|
return (
|
||||||
|
<ErrorAlert heading="Distribution Truncation For Display Error">
|
||||||
{distributionErrorToString(truncatedDistributionWrapper.value)}
|
{distributionErrorToString(truncatedDistributionWrapper.value)}
|
||||||
</ErrorAlert>
|
</ErrorAlert>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
const truncatedDistribution = truncatedDistributionWrapper.value
|
const truncatedDistribution = truncatedDistributionWrapper.value;
|
||||||
|
|
||||||
const shape = distribution.pointSet();
|
const shape = distribution.pointSet();
|
||||||
const shapeTruncated = truncatedDistribution.pointSet(); // distribution.pointSet();
|
const shapeTruncated = truncatedDistribution.pointSet(); // distribution.pointSet();
|
||||||
|
@ -115,8 +120,11 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
|
||||||
<Vega
|
<Vega
|
||||||
spec={spec}
|
spec={spec}
|
||||||
data={
|
data={
|
||||||
truncateTo95ci ?
|
truncateTo95ci
|
||||||
{ con: shapeTruncated.value.continuous, dis: shapeTruncated.value.discrete }
|
? {
|
||||||
|
con: shapeTruncated.value.continuous,
|
||||||
|
dis: shapeTruncated.value.discrete,
|
||||||
|
}
|
||||||
: { con: shape.value.continuous, dis: shape.value.discrete }
|
: { con: shape.value.continuous, dis: shape.value.discrete }
|
||||||
}
|
}
|
||||||
width={widthProp - 10}
|
width={widthProp - 10}
|
||||||
|
|
|
@ -104,7 +104,7 @@ export const SquiggleEditor: React.FC<SquiggleEditorProps> = ({
|
||||||
showSummary,
|
showSummary,
|
||||||
logX,
|
logX,
|
||||||
expY,
|
expY,
|
||||||
truncateTo95ci
|
truncateTo95ci,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user