fix: run yarn format
This commit is contained in:
parent
872204d38e
commit
be8edcba13
|
@ -54,31 +54,36 @@ 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();
|
||||||
|
|
||||||
if (shapeTruncated.tag === "Error") {
|
if (shapeTruncated.tag === "Error") {
|
||||||
return (
|
return (
|
||||||
|
@ -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}
|
||||||
|
|
|
@ -45,7 +45,7 @@ export interface SquiggleChartProps {
|
||||||
truncateTo95ci?: boolean;
|
truncateTo95ci?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultOnChange = () => { };
|
const defaultOnChange = () => {};
|
||||||
const defaultChartSettings = { start: 0, stop: 10, count: 20 };
|
const defaultChartSettings = { start: 0, stop: 10, count: 20 };
|
||||||
|
|
||||||
export const SquiggleChart: React.FC<SquiggleChartProps> = ({
|
export const SquiggleChart: React.FC<SquiggleChartProps> = ({
|
||||||
|
|
|
@ -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