{
  "id": "excess-demand-supply",
  "name": "Excess demand and excess supply",
  "unit": "micro",
  "unitName": "Unit 2 · Microeconomics",
  "topic": "Demand & supply",
  "hl": false,
  "description": "At a price above equilibrium there is a surplus; below it there is a shortage.",
  "keywords": [
    "shortage",
    "surplus",
    "disequilibrium",
    "excess demand",
    "excess supply"
  ],
  "schemaUrl": "https://graphs.lectere.com/api/v1/templates/excess-demand-supply",
  "previewUrl": "https://graphs.lectere.com/thumbs/excess-demand-supply.svg",
  "editorUrl": "https://graphs.lectere.com/graph/excess-demand-supply/",
  "params": [
    {
      "key": "case",
      "label": "Price is",
      "default": "above",
      "type": "enum",
      "options": [
        {
          "value": "above",
          "label": "Above equilibrium (excess supply)"
        },
        {
          "value": "below",
          "label": "Below equilibrium (excess demand)"
        },
        {
          "value": "both",
          "label": "Show both"
        }
      ]
    },
    {
      "key": "eq",
      "label": "Show equilibrium",
      "default": true,
      "type": "boolean"
    },
    {
      "key": "dSlope",
      "label": "Demand steepness",
      "default": 0.8,
      "group": "Shape",
      "type": "number",
      "min": 0.3,
      "max": 2.5,
      "step": 0.05
    },
    {
      "key": "sSlope",
      "label": "Supply steepness",
      "default": 0.8,
      "group": "Shape",
      "type": "number",
      "min": 0.3,
      "max": 2.5,
      "step": 0.05
    },
    {
      "key": "dPos",
      "label": "Demand position",
      "default": 0,
      "group": "Shape",
      "type": "number",
      "min": -3,
      "max": 3,
      "step": 0.1
    },
    {
      "key": "sPos",
      "label": "Supply position",
      "default": 0,
      "group": "Shape",
      "type": "number",
      "min": -3,
      "max": 3,
      "step": 0.1
    }
  ],
  "defaults": {
    "case": "above",
    "eq": true,
    "dSlope": 0.8,
    "sSlope": 0.8,
    "dPos": 0,
    "sPos": 0
  },
  "panels": [
    {
      "id": "main",
      "title": null,
      "xLabel": "Quantity",
      "yLabel": "Price",
      "xRange": [
        0,
        10
      ],
      "yRange": [
        0,
        10
      ],
      "axisKeys": {
        "x": "main:x",
        "y": "main:y"
      }
    }
  ],
  "labels": [
    {
      "key": "main:y",
      "default": "Price",
      "hint": "Vertical axis",
      "panel": "main"
    },
    {
      "key": "main:x",
      "default": "Quantity",
      "hint": "Horizontal axis",
      "panel": "main"
    },
    {
      "key": "main.d",
      "default": "D",
      "hint": "Curve",
      "panel": "main"
    },
    {
      "key": "main.s",
      "default": "S",
      "hint": "Curve",
      "panel": "main"
    },
    {
      "key": "main.e:y",
      "default": "P_e",
      "hint": "Vertical-axis value",
      "panel": "main"
    },
    {
      "key": "main.e:x",
      "default": "Q_e",
      "hint": "Horizontal-axis value",
      "panel": "main"
    },
    {
      "key": "main.hid:x",
      "default": "Q_d",
      "hint": "Horizontal-axis value",
      "panel": "main"
    },
    {
      "key": "main.his:x",
      "default": "Q_s",
      "hint": "Horizontal-axis value",
      "panel": "main"
    },
    {
      "key": "main.higap",
      "default": "excess supply",
      "hint": "Arrow / line",
      "panel": "main"
    },
    {
      "key": "main.hip",
      "default": "P_1",
      "hint": "Axis mark",
      "panel": "main"
    }
  ],
  "elements": [
    {
      "key": "main.d",
      "kind": "curve",
      "label": "D"
    },
    {
      "key": "main.s",
      "kind": "curve",
      "label": "S"
    },
    {
      "key": "main.e",
      "kind": "point"
    },
    {
      "key": "main.hid",
      "kind": "point"
    },
    {
      "key": "main.his",
      "kind": "point"
    },
    {
      "key": "main.hiline",
      "kind": "line"
    },
    {
      "key": "main.higap",
      "kind": "line",
      "label": "excess supply"
    },
    {
      "key": "main.hip",
      "kind": "tick",
      "label": "P_1"
    }
  ],
  "stats": null,
  "example": {
    "template": "excess-demand-supply",
    "params": {
      "case": "above",
      "eq": true,
      "dSlope": 0.8,
      "sSlope": 0.8,
      "dPos": 0,
      "sPos": 0
    }
  }
}