{
  "version": "xarts.graph-relations/1",
  "family": "graph-relations",
  "operation": "decision-tree",
  "provenance": {
    "legacyId": "decisiontree"
  },
  "document": {
    "textOverflow": "preserve",
    "header": {
      "title": "Investment Decision",
      "subtitle": "Investment choices and market outcomes · two unconnected trees"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "Illustrative data to explore the chart and replace with your own."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 16,
      "minimumTextGap": 4
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 800,
      "height": 660
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "decisiontree-quality",
    "embedSpec": true,
    "geometryDecimals": 2
  },
  "data": {
    "nodes": [
      {
        "id": "Invest?",
        "label": "Invest?",
        "type": "decision",
        "payoff": null,
        "expectedValue": null,
        "expansion": "complete"
      },
      {
        "id": "Invest $2M",
        "label": "Invest $2M",
        "type": "chance",
        "payoff": null,
        "expectedValue": null,
        "expansion": "unexpanded"
      },
      {
        "id": "Don't Invest",
        "label": "Don't Invest",
        "type": "outcome",
        "payoff": 0,
        "expectedValue": null,
        "expansion": "complete"
      },
      {
        "id": "Market Outcome",
        "label": "Market Outcome",
        "type": "chance",
        "payoff": null,
        "expectedValue": null,
        "expansion": "complete"
      },
      {
        "id": "Success",
        "label": "Success",
        "type": "outcome",
        "payoff": 5,
        "expectedValue": null,
        "expansion": "complete"
      },
      {
        "id": "Moderate",
        "label": "Moderate",
        "type": "outcome",
        "payoff": 2.5,
        "expectedValue": null,
        "expansion": "complete"
      },
      {
        "id": "Failure",
        "label": "Failure",
        "type": "outcome",
        "payoff": -1,
        "expectedValue": null,
        "expansion": "complete"
      }
    ],
    "edges": [
      {
        "id": "branch-1",
        "source": "Invest?",
        "target": "Invest $2M",
        "label": "Invest $2M",
        "probability": null
      },
      {
        "id": "branch-2",
        "source": "Invest?",
        "target": "Don't Invest",
        "label": "Don't Invest",
        "probability": null
      },
      {
        "id": "branch-3",
        "source": "Market Outcome",
        "target": "Success",
        "label": "Success",
        "probability": 0.6
      },
      {
        "id": "branch-4",
        "source": "Market Outcome",
        "target": "Moderate",
        "label": "Moderate",
        "probability": 0.25
      },
      {
        "id": "branch-5",
        "source": "Market Outcome",
        "target": "Failure",
        "label": "Failure",
        "probability": 0.15
      }
    ],
    "measure": {
      "unit": "USD million",
      "prefix": "$",
      "suffix": "M",
      "meaning": "declared-terminal-payoff"
    }
  },
  "calculation": {
    "direction": "parent-to-child",
    "roots": "forest",
    "order": "input",
    "expectedValue": "none",
    "decisionRule": "maximum-payoff",
    "probabilityTolerance": 1e-9
  },
  "layout": {
    "algorithm": "depth-leaf-lanes",
    "margin": {
      "top": 36,
      "right": 56,
      "bottom": 36,
      "left": 56
    },
    "xRange": [
      0.08,
      0.88
    ],
    "text": {
      "exportMeasurement": "glyph-advances",
      "lineHeight": 22,
      "clearance": 8,
      "step": 13,
      "textGap": 4,
      "strokeGap": 4,
      "anchors": [
        0.5,
        0.42,
        0.58,
        0.34,
        0.66,
        0.26,
        0.74
      ],
      "maxSteps": 2,
      "overflow": "reject"
    }
  },
  "marks": {
    "decision": {
      "half": 28,
      "fill": "series.blue",
      "stroke": "series.blue",
      "strokeWidth": 2,
      "fillOpacity": 0.12
    },
    "chance": {
      "radius": 62,
      "fill": "series.amber",
      "stroke": "series.amber",
      "strokeWidth": 2,
      "fillOpacity": 0.12
    },
    "outcome": {
      "width": 120,
      "height": 36,
      "radius": 4,
      "strokeWidth": 2,
      "fillOpacity": 0.12,
      "positive": "series.emerald",
      "neutral": "series.cyan",
      "negative": "series.red"
    },
    "edges": {
      "color": "textMuted",
      "width": 1.5,
      "opacity": 0.7
    }
  },
  "labels": {
    "node": {
      "fontSize": 14,
      "fontWeight": 600,
      "color": "textPrimary"
    },
    "chance": {
      "fontSize": 14,
      "fontWeight": 600,
      "color": "textPrimary"
    },
    "branch": {
      "fontSize": 14,
      "fontWeight": 500,
      "color": "textSecondary"
    },
    "probability": {
      "fontSize": 14,
      "fontWeight": 600,
      "color": "textMuted"
    },
    "expectedValue": {
      "fontSize": 14,
      "fontWeight": 700,
      "color": "series.blue"
    },
    "baselineOffset": 4,
    "lineHeight": 18,
    "outcomePadding": 10,
    "expectedValueGap": 12,
    "expectedValuePrefix": "EV: "
  },
  "interaction": {
    "hover": true,
    "typeLabel": "Type",
    "valueLabel": "Value"
  },
  "annotations": []
}
