From f0f76ff96eea1afca84091309329a32544b96a39 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 4 Mar 2020 10:19:37 +0000 Subject: [PATCH 1/2] Minor changes --- src/components/charts/DistPlusPlot.re | 8 ++++---- src/components/charts/DistPlusPlotReducer.re | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) 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: [ From fc0400f09309107c1913330d8f652dc48ff2ac1a Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 4 Mar 2020 10:27:50 +0000 Subject: [PATCH 2/2] Added extra showcase options --- showcase/entries/Continuous.re | 63 +++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 9 deletions(-) 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