{
 "kind": "tool",
 "slug": "chart-js",
 "path": "tools/chart-js/",
 "name": "Chart.js",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Charts and data visualisation",
   "tools/charts/"
  ]
 ],
 "lead": "Simple HTML5 canvas-based charting library for creating interactive data visualizations.",
 "chips": [
  {
   "label": "Charts and data visualisation",
   "path": "tools/charts/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install chart.js"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/chartjs/Chart.js"
  },
  {
   "label": "Website",
   "href": "https://www.chartjs.org"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/chartjs/Chart.js"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Nov 23, 2026. ",
   "src": "https://github.com/chartjs/Chart.js"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "88 projects",
   "status": "info",
   "sub": "#3 of 95 in its category",
   "note": "Dependency in 88 public GitHub projects set up for AI coding agents that we scanned (1.4%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Chart.js does",
   "parts": [
    {
     "t": "prose",
     "text": "Chart.js draws charts on an HTML5 <code>&lt;canvas&gt;</code> from one <code>new Chart(ctx, config)</code> call that takes a plain config object, and since v4 registering only the components you need can shrink the bundle."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Chart.js popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "78",
       "of": "/ 100",
       "l": "Gid Score, #125 overall"
      },
      {
       "n": "18M",
       "l": "downloads a week, npm"
      },
      {
       "n": "67.8K",
       "l": "GitHub stars"
      },
      {
       "n": "88",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Chart.js is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Chart.js is a dependency in 88 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.8% of the 4,867 JavaScript/TypeScript ones), #3 of 95 in charts and data visualisation.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 252; those are left out of every share on this page.",
      "The most used alternative in our scan is Recharts (576 projects).",
      "Projects that use it most often also use Tailwind CSS (80.7%), React Chart.js 2 (45.5%), Vite (55.7%).",
      "It is more common in projects set up for Junie (8.1%) than for GitHub Copilot (1.4%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "49 projects, 1.5%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "46 projects, 1.9%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "43 projects, 1.4%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "12 projects, 3.5%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "8 projects, 1.7%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "7 projects, 1.5%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "6 projects, 8.1%",
       "v": "Junie",
       "path": "agents/junie/"
      },
      {
       "l": "5 projects, 1.8%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 80.7% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 45.5% of its projects",
       "v": "React Chart.js 2",
       "path": "tools/react-chartjs-2/"
      },
      {
       "l": "In 55.7% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      },
      {
       "l": "In 64.8% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 79.5% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 27.3% of its projects",
       "v": "Tailwind CSS Animate",
       "path": "tools/tailwindcss-animate/"
      },
      {
       "l": "In 28.4% of its projects",
       "v": "Axios",
       "path": "tools/axios/"
      },
      {
       "l": "In 45.5% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Chart.js in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "A chart is one config object",
       "v": "The getting-started example uses a <code>&lt;canvas&gt;</code>, one CDN script tag and a single <code>new Chart(ctx, {...})</code> call. That call holds the type, labels, data and options."
      },
      {
       "l": "Register only what you draw",
       "v": "Version 4 added tree-shaking. The site says registering only the components you need can reduce the bundle \"by dozens of kilobytes\"."
      },
      {
       "l": "A 1M-point showcase",
       "v": "The maintainers list performance work in 3.0. Their example plots 1M points with the decimation plugin enabled."
      },
      {
       "l": "Bar and line in one chart",
       "v": "Since 2.0 you can mix bar and line charts. The site says this gives a clear visual distinction between datasets."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Cloning the repo gives you no dist files",
       "v": "The docs say Chart.js \"no longer comes with prebuilt release versions\". If you download or clone the repository, you must build it to get the dist files. The docs strongly advise using another install option."
      },
      {
       "l": "Docs links default to v4",
       "v": "All README documentation links point to version 4. If you are on an older version, you have to put the version number in the docs URL yourself, for example <code>/docs/2.9.4/</code>."
      },
      {
       "l": "Server-side images take extra plumbing",
       "v": "The Chart Splat builders write that using Chart.js from PHP or other non-Node backends means running a separate Node.js service or a headless browser. They built their API because of that gap."
      }
     ]
    },
    {
     "t": "h3",
     "text": "The script from the getting-started bar chart (needs a canvas with id myChart)"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Javascript",
       "code": "const ctx = document . getElementById ( 'myChart' ) ;\nnew Chart ( ctx , {\n  type : 'bar' ,\n  data : {\n    labels : [ 'Red' , 'Blue' , 'Yellow' , 'Green' , 'Purple' , 'Orange' ] ,\n    datasets : [ {\n      label : '# of Votes' ,\n      data : [ 12 , 19 , 3 , 5 , 2 , 3 ] ,\n      borderWidth : 1\n    } ]\n  } ,\n  options : {\n    scales : {\n      y : {\n        beginAtZero : true\n      }\n    }\n  }\n} ) ;"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Chart.js",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Head to head",
       "items": [
        {
         "text": "Recharts vs Chart.js",
         "note": "used together in 25 projects",
         "path": "tools/compare/recharts-vs-chartjs/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "tailwindcss: Utility-first CSS",
        "react-chartjs-2: React wrapper for Chart.js",
        "vite: Build tool and dev server",
        "typescript: Typed JavaScript",
        "eslint: JavaScript linter",
        "tailwindcss-animate: Tailwind animation utilities"
       ]
      },
      {
       "title": "More in Charts and data visualisation",
       "path": "tools/charts/",
       "items": [
        {
         "text": "Matplotlib",
         "path": "tools/matplotlib/"
        },
        {
         "text": "Mermaid",
         "path": "tools/mermaid/"
        },
        {
         "text": "XY Flow",
         "path": "tools/xyflow/"
        },
        {
         "text": "Seaborn",
         "path": "tools/seaborn/"
        },
        {
         "text": "Plotly",
         "path": "tools/plotly/"
        },
        {
         "text": "React Chart.js 2",
         "path": "tools/react-chartjs-2/"
        },
        {
         "text": "Diagrams",
         "path": "tools/diagrams/"
        },
        {
         "text": "d3-scale",
         "path": "tools/d3-scale/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Chart.js",
       "me": true,
       "facts": [
        "MIT",
        "Gid 78",
        "18M/wk"
       ]
      },
      {
       "name": "Recharts",
       "why": "Composable React component library for building responsive charts.",
       "path": "tools/recharts/",
       "facts": [
        "MIT",
        "Gid 85",
        "71.4M/wk"
       ]
      },
      {
       "name": "D3.js",
       "why": "JavaScript library for creating data-driven documents with powerful data visualization capabilities.",
       "path": "tools/d3/",
       "facts": [
        "ISC",
        "Gid 81",
        "36M/wk"
       ]
      },
      {
       "name": "Apache ECharts",
       "why": "Powerful interactive charting library for data visualization in browsers.",
       "path": "tools/echarts/",
       "facts": [
        "Apache-2.0",
        "Gid 75",
        "11.4M/wk"
       ]
      },
      {
       "name": "ApexCharts",
       "why": "Interactive JavaScript charting library for creating modern data visualizations.",
       "path": "tools/apexcharts/",
       "facts": [
        "SEE LICENSE IN LICENSE.md",
        "Gid 60",
        "2.9M/wk"
       ]
      }
     ],
     "more": "Compare Chart.js with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install chart.js"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Chart.js\n- Install with `npm install chart.js`, or load the built files from CDNJS or jsDelivr. Do not download or clone the repository for dist files: Chart.js no longer comes with prebuilt release versions, so you would have to build it.\n- Give each chart's `<canvas>` its own container element. The docs recommend this for responsiveness.\n- Create charts with `new Chart(ctx, { type, data, options })`, where `ctx` is the canvas element.\n- In bundled apps, consider registering only the components a chart needs. The site says this can reduce bundle size by dozens of kilobytes.\n- Docs links point to v4. If a project pins an older version, read the versioned docs, e.g. `https://www.chartjs.org/docs/2.9.4/`.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm chart.js"
  ],
  [
   "Category",
   "Charts and data visualisation"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v4.6.1, October 22, 2026"
  ],
  [
   "On GitHub since",
   "March 2013"
  ],
  [
   "Gid Score",
   "78.5"
  ],
  [
   "Rank in category",
   "#3 of 95"
  ],
  [
   "GitHub",
   "chartjs/Chart.js"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/chartjs.png"
}