cap_drawings

LimitSeen in: The editor, Charts, RunsSee the limit

What happened

A script runs with a limit on the drawings it may use. When it goes over, the sandbox stops it and answers with this code. detail names the cap that tripped (max_drawings), how much the script used and how much was allowed. The caps differ for a chart and for a run, and the code sandbox section of the Limits page lists them.

What to do

Draw fewer objects, for example only on the bars that matter. Each line, box and label counts.

Example

json
{
  "request_id": "7d2b1c44-95a0-4e3b-8a6f-1c0d9e2f5a37",
  "ok": false,
  "error": {
    "code": "cap_drawings",
    "message": "The script produced more drawings than allowed.",
    "detail": {
      "cap": "max_drawings",
      "used": 620,
      "allowed": 500
    }
  }
}

Ask about this in the forum