Minor tweaks

This commit is contained in:
Ozzie Gooen 2020-04-20 17:29:37 +01:00
parent ad42a1d404
commit 63be03e1ab
3 changed files with 13 additions and 7 deletions

View File

@ -171,7 +171,7 @@ let make = () => {
~schema, ~schema,
~onSubmit=({state}) => {None}, ~onSubmit=({state}) => {None},
~initialState={ ~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", domainType: "Complete",
xPoint: "50.0", xPoint: "50.0",
xPoint2: "60.0", xPoint2: "60.0",
@ -313,7 +313,7 @@ let make = () => {
<Form.Provider value=reform> <Form.Provider value=reform>
<Antd.Form onSubmit> <Antd.Form onSubmit>
<Row _type=`flex className=Styles.rows> <Row _type=`flex className=Styles.rows>
<Col span=12> <Col span=24>
<FieldString <FieldString
field=FormConfig.GuesstimatorString field=FormConfig.GuesstimatorString
label="Guesstimator String" label="Guesstimator String"

View File

@ -1,4 +1,5 @@
open DistPlusPlotReducer; open DistPlusPlotReducer;
let plotBlue = `hex("1860ad");
let showAsForm = (distPlus: DistTypes.distPlus) => { let showAsForm = (distPlus: DistTypes.distPlus) => {
<div> <div>
@ -264,7 +265,7 @@ module DistPlusChart = {
yMaxContinuousDomainFactor yMaxContinuousDomainFactor
?discrete ?discrete
?continuous ?continuous
color={`hex("1894d6")} color=plotBlue
onHover onHover
timeScale timeScale
/>; />;
@ -280,9 +281,13 @@ module IntegralChart = {
integral integral
|> Distributions.Continuous.toLinear |> Distributions.Continuous.toLinear
|> E.O.fmap(Distributions.Continuous.getShape); |> E.O.fmap(Distributions.Continuous.getShape);
let range = T.xTotalRange(distPlus); let minX = {
let minX = T.minX(distPlus) -. range *. 0.001; distPlus |> Distributions.DistPlus.T.Integral.yToX(~cache=None, 0.00001);
let maxX = integral |> Distributions.Continuous.T.maxX; };
let maxX = {
distPlus |> Distributions.DistPlus.T.Integral.yToX(~cache=None, 0.99);
};
let timeScale = distPlus.unit |> DistTypes.DistributionUnit.toJson; let timeScale = distPlus.unit |> DistTypes.DistributionUnit.toJson;
<DistributionPlot <DistributionPlot
xScale={config.xLog ? "log" : "linear"} xScale={config.xLog ? "log" : "linear"}
@ -291,7 +296,7 @@ module IntegralChart = {
minX minX
maxX maxX
?continuous ?continuous
color={`hex("1894d6")} color=plotBlue
timeScale timeScale
onHover onHover
/>; />;

View File

@ -107,5 +107,6 @@ let init = {
showPercentiles: true, showPercentiles: true,
distributions: [ distributions: [
{yLog: false, xLog: false, isCumulative: false, height: 4}, {yLog: false, xLog: false, isCumulative: false, height: 4},
{yLog: false, xLog: false, isCumulative: true, height: 1},
], ],
}; };