{
  "version": "xarts.distribution/1",
  "family": "distribution",
  "operation": "frequency-distribution",
  "provenance": {
    "legacyId": "simulationhist"
  },
  "data": {
    "input": "bins",
    "unit": "$M",
    "valueLabel": "Net present value",
    "rows": [
      {
        "id": "bin-1",
        "lower": -30,
        "upper": -26,
        "count": 172
      },
      {
        "id": "bin-2",
        "lower": -26,
        "upper": -22,
        "count": 219
      },
      {
        "id": "bin-3",
        "lower": -22,
        "upper": -18,
        "count": 352
      },
      {
        "id": "bin-4",
        "lower": -18,
        "upper": -14,
        "count": 492
      },
      {
        "id": "bin-5",
        "lower": -14,
        "upper": -10,
        "count": 676
      },
      {
        "id": "bin-6",
        "lower": -10,
        "upper": -6,
        "count": 888
      },
      {
        "id": "bin-7",
        "lower": -6,
        "upper": -2,
        "count": 1084
      },
      {
        "id": "bin-8",
        "lower": -2,
        "upper": 2,
        "count": 1294
      },
      {
        "id": "bin-9",
        "lower": 2,
        "upper": 6,
        "count": 1471
      },
      {
        "id": "bin-10",
        "lower": 6,
        "upper": 10,
        "count": 1600
      },
      {
        "id": "bin-11",
        "lower": 10,
        "upper": 14,
        "count": 1633
      },
      {
        "id": "bin-12",
        "lower": 14,
        "upper": 18,
        "count": 1568
      },
      {
        "id": "bin-13",
        "lower": 18,
        "upper": 22,
        "count": 1489
      },
      {
        "id": "bin-14",
        "lower": 22,
        "upper": 26,
        "count": 1314
      },
      {
        "id": "bin-15",
        "lower": 26,
        "upper": 30,
        "count": 1095
      },
      {
        "id": "bin-16",
        "lower": 30,
        "upper": 34,
        "count": 900
      },
      {
        "id": "bin-17",
        "lower": 34,
        "upper": 38,
        "count": 675
      },
      {
        "id": "bin-18",
        "lower": 38,
        "upper": 42,
        "count": 503
      },
      {
        "id": "bin-19",
        "lower": 42,
        "upper": 46,
        "count": 342
      },
      {
        "id": "bin-20",
        "lower": 46,
        "upper": 50,
        "count": 247
      },
      {
        "id": "bin-21",
        "lower": 50,
        "upper": 54,
        "count": 158
      },
      {
        "id": "bin-22",
        "lower": 54,
        "upper": 58,
        "count": 107
      },
      {
        "id": "bin-23",
        "lower": 58,
        "upper": 62,
        "count": 62
      },
      {
        "id": "bin-24",
        "lower": 62,
        "upper": 66,
        "count": 30
      },
      {
        "id": "bin-25",
        "lower": 66,
        "upper": 70,
        "count": 26
      }
    ]
  },
  "calculation": {
    "binning": {
      "method": "provided",
      "order": "strictly-increasing-nonoverlap"
    },
    "measure": "count",
    "statistics": {
      "source": "provided",
      "basis": "external-summary",
      "description": "Estadísticas externas declaradas en la referencia; no se deducen de las frecuencias agregadas.",
      "values": {
        "mean": 12.4,
        "stdDev": 17.8,
        "p5": -18.2,
        "p50": 13.1,
        "p95": 42.6,
        "probPositive": 0.742
      }
    }
  },
  "layout": {
    "view": "frequency-bars-and-statistics",
    "margin": {
      "top": 24,
      "right": 100,
      "bottom": 44,
      "left": 56
    },
    "domain": {
      "source": "bins"
    },
    "yPadding": 0.1,
    "roundYMaximum": false,
    "niceY": true,
    "measureYMargin": true,
    "measureXEdges": false,
    "fitXTicks": false,
    "smartAxes": true,
    "proportionalTicks": false,
    "axisMeasurementNumerals": "proportional-nums",
    "axisInkPadding": 0,
    "xTicks": 8,
    "yTicks": 5
  },
  "marks": {
    "bars": {
      "color": "series.blue",
      "opacity": 0.8,
      "stroke": "series.blue",
      "strokeOpacity": 0.3,
      "strokeWidth": 0.5,
      "radius": 0
    },
    "zero": null,
    "band": {
      "from": "p5",
      "to": "p95",
      "color": "series.blue",
      "opacity": 0.08
    },
    "normal": null,
    "references": [
      {
        "statistic": "p5",
        "line": {
          "color": "series.red",
          "width": 1.5,
          "dash": "6,4"
        },
        "label": {
          "text": "P5: {value}",
          "dx": 0,
          "y": -6,
          "anchor": "middle",
          "fontSize": 10,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "number",
            "decimals": 1,
            "trim": false,
            "sign": false,
            "prefix": "$",
            "suffix": "M"
          }
        }
      },
      {
        "statistic": "p50",
        "line": {
          "color": "series.amber",
          "width": 1.5,
          "dash": "6,4"
        },
        "label": {
          "text": "P50: {value}",
          "dx": 4,
          "y": -6,
          "anchor": "start",
          "fontSize": 10,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "number",
            "decimals": 1,
            "trim": false,
            "sign": false,
            "prefix": "$",
            "suffix": "M"
          }
        }
      },
      {
        "statistic": "p95",
        "line": {
          "color": "series.emerald",
          "width": 1.5,
          "dash": "6,4"
        },
        "label": {
          "text": "P95: {value}",
          "dx": 0,
          "y": -6,
          "anchor": "middle",
          "fontSize": 10,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "number",
            "decimals": 1,
            "trim": false,
            "sign": false,
            "prefix": "$",
            "suffix": "M"
          }
        }
      },
      {
        "statistic": "mean",
        "line": {
          "color": "series.teal",
          "width": 2,
          "dash": "4,3"
        },
        "label": {
          "text": "Mean: {value}",
          "dx": -4,
          "y": -6,
          "anchor": "end",
          "fontSize": 10,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "number",
            "decimals": 1,
            "trim": false,
            "sign": false,
            "prefix": "$",
            "suffix": "M"
          }
        }
      }
    ]
  },
  "summary": {
    "visible": true,
    "arrangement": "stacked",
    "dx": 12,
    "dy": 4,
    "width": 118,
    "rowHeight": 22,
    "itemGap": 5,
    "labelX": 0,
    "valueX": 0,
    "firstBaseline": 0,
    "labelFontSize": 9,
    "valueFontSize": 10,
    "labelColor": "textMuted",
    "valueColor": "textPrimary",
    "box": null,
    "items": [
      {
        "statistic": "mean",
        "label": "Mean",
        "format": {
          "kind": "number",
          "decimals": 1,
          "trim": false,
          "sign": false,
          "prefix": "$",
          "suffix": "M"
        }
      },
      {
        "statistic": "stdDev",
        "label": "Std Dev",
        "format": {
          "kind": "number",
          "decimals": 1,
          "trim": false,
          "sign": false,
          "prefix": "$",
          "suffix": "M"
        }
      },
      {
        "statistic": "p5",
        "label": "P5",
        "format": {
          "kind": "number",
          "decimals": 1,
          "trim": false,
          "sign": false,
          "prefix": "$",
          "suffix": "M"
        }
      },
      {
        "statistic": "p50",
        "label": "P50",
        "format": {
          "kind": "number",
          "decimals": 1,
          "trim": false,
          "sign": false,
          "prefix": "$",
          "suffix": "M"
        }
      },
      {
        "statistic": "p95",
        "label": "P95",
        "format": {
          "kind": "number",
          "decimals": 1,
          "trim": false,
          "sign": false,
          "prefix": "$",
          "suffix": "M"
        }
      },
      {
        "statistic": "probPositive",
        "label": "P(NPV>0)",
        "format": {
          "kind": "percent-fraction",
          "decimals": 1,
          "trim": true,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      }
    ]
  },
  "labels": {
    "zero": "Zero",
    "normal": "Normal reference",
    "measureTitles": {
      "count": "",
      "probability": "Probability",
      "density": "Probability density"
    },
    "annotationFontSize": 12,
    "annotationGap": 8,
    "value": {
      "kind": "number",
      "decimals": 1,
      "trim": true,
      "sign": false,
      "prefix": "$",
      "suffix": "M"
    },
    "tooltipRange": "{lower} – {upper}",
    "tooltipCount": "Frequency: {count}",
    "tooltipShare": "",
    "shareDecimals": 1
  },
  "annotations": [],
  "document": {
    "header": {
      "title": "Monte Carlo Simulation",
      "subtitle": "Distribution of 10,000 simulated NPV outcomes"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "Illustrative data to explore the chart and replace with your own."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 24,
      "minimumTextGap": 6
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 800,
      "height": 500
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "simulationhist",
    "embedSpec": true,
    "geometryDecimals": 2
  }
}
