{
  "id": "demand-curve",
  "name": "Demand curve (law of demand)",
  "unit": "micro",
  "unitName": "Unit 2 · Microeconomics",
  "topic": "Demand & supply",
  "hl": false,
  "description": "A downward-sloping demand curve showing a movement along the curve after a price change.",
  "keywords": [
    "law of demand",
    "movement along",
    "extension",
    "contraction",
    "quantity demanded"
  ],
  "schemaUrl": "https://graphs.lectere.com/api/v1/templates/demand-curve",
  "previewUrl": "https://graphs.lectere.com/thumbs/demand-curve.svg",
  "editorUrl": "https://graphs.lectere.com/graph/demand-curve/",
  "params": [
    {
      "key": "dir",
      "label": "Price change",
      "default": "fall",
      "type": "enum",
      "options": [
        {
          "value": "fall",
          "label": "Price falls (extension)"
        },
        {
          "value": "rise",
          "label": "Price rises (contraction)"
        }
      ]
    },
    {
      "key": "points",
      "label": "Label points A and B",
      "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
    }
  ],
  "defaults": {
    "dir": "fall",
    "points": true,
    "dSlope": 0.8
  },
  "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.a",
      "default": "A",
      "hint": "Point",
      "panel": "main"
    },
    {
      "key": "main.a:y",
      "default": "P_1",
      "hint": "Vertical-axis value",
      "panel": "main"
    },
    {
      "key": "main.a:x",
      "default": "Q_1",
      "hint": "Horizontal-axis value",
      "panel": "main"
    },
    {
      "key": "main.b",
      "default": "B",
      "hint": "Point",
      "panel": "main"
    },
    {
      "key": "main.b:y",
      "default": "P_2",
      "hint": "Vertical-axis value",
      "panel": "main"
    },
    {
      "key": "main.b:x",
      "default": "Q_2",
      "hint": "Horizontal-axis value",
      "panel": "main"
    }
  ],
  "elements": [
    {
      "key": "main.d",
      "kind": "curve",
      "label": "D"
    },
    {
      "key": "main.a",
      "kind": "point",
      "label": "A"
    },
    {
      "key": "main.b",
      "kind": "point",
      "label": "B"
    },
    {
      "key": "main.move",
      "kind": "line"
    }
  ],
  "stats": null,
  "example": {
    "template": "demand-curve",
    "params": {
      "dir": "fall",
      "points": true,
      "dSlope": 0.8
    }
  }
}