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]);
|
||||
|
||||
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">
|
||||
{distributionErrorToString(p3wrapped.value)}
|
||||
</ErrorAlert>
|
||||
return (
|
||||
<ErrorAlert heading="Distribution Calculation Error">
|
||||
{distributionErrorToString(p3wrapped.value)}
|
||||
</ErrorAlert>
|
||||
);
|
||||
} else if (p97wrapped.tag == "Error") {
|
||||
return <ErrorAlert heading="Distribution Calculation Error">
|
||||
{distributionErrorToString(p97wrapped.value)}
|
||||
</ErrorAlert>
|
||||
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">
|
||||
{distributionErrorToString(truncatedDistributionWrapper.value)}
|
||||
</ErrorAlert>
|
||||
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();
|
||||
const shapeTruncated = truncatedDistribution.pointSet(); // distribution.pointSet();
|
||||
|
||||
if (shapeTruncated.tag === "Error") {
|
||||
return (
|
||||
|
@ -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}
|
||||
|
@ -140,10 +148,10 @@ export const DistributionChart: React.FC<DistributionChartProps> = ({
|
|||
// Check whether we should disable the checkbox
|
||||
{...(massBelow0
|
||||
? {
|
||||
disabled: true,
|
||||
tooltip:
|
||||
"Your distribution has mass lower than or equal to 0. Log only works on strictly positive values.",
|
||||
}
|
||||
disabled: true,
|
||||
tooltip:
|
||||
"Your distribution has mass lower than or equal to 0. Log only works on strictly positive values.",
|
||||
}
|
||||
: {})}
|
||||
/>
|
||||
<CheckBox label="Exp Y scale" value={isExpY} onChange={setExpY} />
|
||||
|
|
|
@ -45,7 +45,7 @@ export interface SquiggleChartProps {
|
|||
truncateTo95ci?: boolean;
|
||||
}
|
||||
|
||||
const defaultOnChange = () => { };
|
||||
const defaultOnChange = () => {};
|
||||
const defaultChartSettings = { start: 0, stop: 10, count: 20 };
|
||||
|
||||
export const SquiggleChart: React.FC<SquiggleChartProps> = ({
|
||||
|
|
|
@ -104,7 +104,7 @@ export const SquiggleEditor: React.FC<SquiggleEditorProps> = ({
|
|||
showSummary,
|
||||
logX,
|
||||
expY,
|
||||
truncateTo95ci
|
||||
truncateTo95ci,
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user