module ComplexPowerChart = {
[@react.component]
let make = (~complexPower: DistributionTypes.complexPower, ~onHover) => {
open DistFunctor.ComplexPower;
let discrete = complexPower |> T.toDiscrete;
let continuous =
complexPower
|> T.toContinuous
|> E.O.fmap(DistFunctor.Continuous.getShape);
let minX = T.minX(complexPower);
let maxX = T.maxX(complexPower);
let timeScale =
complexPower.unit |> DistributionTypes.DistributionUnit.toJson;
;
};
};
[@react.component]
let make = (~complexPower: DistributionTypes.complexPower) => {
let (x, setX) = React.useState(() => 0.);
let chart =
React.useMemo1(
() => { {setX(_ => r)}} />},
[|complexPower|],
);
chart
{"X Point" |> ReasonReact.string} |
{"Y Integral to Point" |> ReasonReact.string}
|
{x |> E.Float.toString |> ReasonReact.string}
|
{complexPower
|> DistFunctor.ComplexPower.T.Integral.xToY(~cache=None, x)
|> E.Float.with2DigitsPrecision
|> ReasonReact.string}
|
;
};