From 63be03e1ab94aac8b915a64bbe7500188c3c1195 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Mon, 20 Apr 2020 17:29:37 +0100 Subject: [PATCH] Minor tweaks --- src/components/DistBuilder.re | 4 ++-- src/components/charts/DistPlusPlot.re | 15 ++++++++++----- src/components/charts/DistPlusPlotReducer.re | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/DistBuilder.re b/src/components/DistBuilder.re index 8c749134..077d0216 100644 --- a/src/components/DistBuilder.re +++ b/src/components/DistBuilder.re @@ -171,7 +171,7 @@ let make = () => { ~schema, ~onSubmit=({state}) => {None}, ~initialState={ - guesstimatorString: "mm(normal(10, 2), uniform(16, 20), normal(15,1))", + guesstimatorString: "mm(normal(-10, 2), uniform(18, 25), lognormal({mean: 10, stdev: 8}), triangular(31,40,50))", domainType: "Complete", xPoint: "50.0", xPoint2: "60.0", @@ -313,7 +313,7 @@ let make = () => { - + {
@@ -264,7 +265,7 @@ module DistPlusChart = { yMaxContinuousDomainFactor ?discrete ?continuous - color={`hex("1894d6")} + color=plotBlue onHover timeScale />; @@ -280,9 +281,13 @@ module IntegralChart = { integral |> Distributions.Continuous.toLinear |> E.O.fmap(Distributions.Continuous.getShape); - let range = T.xTotalRange(distPlus); - let minX = T.minX(distPlus) -. range *. 0.001; - let maxX = integral |> Distributions.Continuous.T.maxX; + let minX = { + distPlus |> Distributions.DistPlus.T.Integral.yToX(~cache=None, 0.00001); + }; + + let maxX = { + distPlus |> Distributions.DistPlus.T.Integral.yToX(~cache=None, 0.99); + }; let timeScale = distPlus.unit |> DistTypes.DistributionUnit.toJson; ; diff --git a/src/components/charts/DistPlusPlotReducer.re b/src/components/charts/DistPlusPlotReducer.re index 793f824d..7eaa48f1 100644 --- a/src/components/charts/DistPlusPlotReducer.re +++ b/src/components/charts/DistPlusPlotReducer.re @@ -107,5 +107,6 @@ let init = { showPercentiles: true, distributions: [ {yLog: false, xLog: false, isCumulative: false, height: 4}, + {yLog: false, xLog: false, isCumulative: true, height: 1}, ], }; \ No newline at end of file