diff --git a/showcase/entries/Continuous.re b/showcase/entries/Continuous.re index e801baf4..78e104ce 100644 --- a/showcase/entries/Continuous.re +++ b/showcase/entries/Continuous.re @@ -20,23 +20,68 @@ let setup = dist => ~sampleCount=10000, ~outputXYPoints=2000, ~truncateTo=Some(1000), - ); + ) + |> E.O.React.fmapOrNull(distPlus => ); let distributions = () =>
-

{"Single-Discrete" |> ReasonReact.string}

+

+ {"Initial Section" |> ReasonReact.string} +

+

+ {"Continuous" |> ReasonReact.string} +

+ {setup(DistPlusIngredients.make(~guesstimatorString="5 to 20", ()))} +

+ {"Discrete" |> ReasonReact.string} +

+ {setup( + DistPlusIngredients.make(~guesstimatorString="floor(10 to 20)", ()), + )} +

+ {"Mixed" |> ReasonReact.string} +

{setup( DistPlusIngredients.make( - ~guesstimatorString= - "uniform(0,1) > 0.3 ? lognormal(6.652, -0.41): 0", - ~domain= - RightLimited({xPoint: 50.0, excludingProbabilityMass: 0.3}), + ~guesstimatorString="mm(5 to 20, floor(20 to 30), [.5,.5])", (), ), - ) - |> E.O.React.fmapOrNull(distPlus => )} + )} +

+ {"Over Time" |> ReasonReact.string} +

+

+ {"Continuous" |> ReasonReact.string} +

+ {setup( + DistPlusIngredients.make( + ~guesstimatorString="5 to 20", + ~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}), + (), + ), + )} +

+ {"Discrete" |> ReasonReact.string} +

+ {setup( + DistPlusIngredients.make( + ~guesstimatorString="floor(10 to 20)", + ~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}), + (), + ), + )} +

+ {"Mixed" |> ReasonReact.string} +

+ {setup( + DistPlusIngredients.make( + ~guesstimatorString="mm(5 to 20, floor(20 to 30), [.5,.5])", + ~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}), + (), + ), + )}
; -let entry = EntryTypes.(entry(~title="Pdf", ~render=distributions)); +let entry = EntryTypes.(entry(~title="Pdf", ~render=distributions)); \ No newline at end of file diff --git a/src/components/charts/DistPlusPlot.re b/src/components/charts/DistPlusPlot.re index 5d7cd16c..7712a7c7 100644 --- a/src/components/charts/DistPlusPlot.re +++ b/src/components/charts/DistPlusPlot.re @@ -245,7 +245,7 @@ let make = (~distPlus: DistTypes.distPlus) => { {index != 0 ? : ReasonReact.null} diff --git a/src/components/charts/DistPlusPlotReducer.re b/src/components/charts/DistPlusPlotReducer.re index 2019e9d6..c3088a28 100644 --- a/src/components/charts/DistPlusPlotReducer.re +++ b/src/components/charts/DistPlusPlotReducer.re @@ -5,7 +5,6 @@ type chartConfig = { }; type state = { - log: bool, showStats: bool, showParams: bool, distributions: list(chartConfig), @@ -87,7 +86,6 @@ let reducer = (state: state, action: action) => }; let init = { - log: false, showStats: false, showParams: false, distributions: [