{"id":28090,"date":"2022-06-10T07:39:45","date_gmt":"2022-06-10T07:39:45","guid":{"rendered":"http:\/\/create-a-pie-chart-in-nextjs"},"modified":"2025-10-23T10:10:32","modified_gmt":"2025-10-23T17:10:32","slug":"create-a-pie-chart-in-nextjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs","title":{"rendered":"Create a Pie Chart in Next.js"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>The pie chart is one of the most effective ways of illustrating data and they have been around since the 1800s. A pie chart is a circular graph showing statistical information in numerical proportion. Pie charts are used widely in analyzing business and media data.<\/p>\n<p>At the end of the article, you will have understood how to implement a pie chart into your Next.js application. We\u2019ll show you how to use NPM <code>chart.js<\/code> and <code>chart.js react<\/code> to create and render pie charts. In the process we\u2019ll give you <code>chart.js<\/code> examples to make it easier to code on your own.<\/p>\n<h2>Prerequisites<\/h2>\n<p>A basic understanding of Next.js is needed to follow along with this article.<\/p>\n<h2>Repository<\/h2>\n<p>You can find the complete code used in this article on GitHub:<\/p>\n<p><a href=\"https:\/\/github.com\/folucode\/nextjs-pie-chart\">https:\/\/github.com\/folucode\/nextjs-pie-chart<\/a><\/p>\n<h2>Sandbox<\/h2>\n<p>The completed project is on CodeSandbox. Fork it and run the code using the \u201cOpen Editor\u201d link in the sandbox.<\/p>\n<\/div>\n\n\n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/create-a-pie-chart-in-next-js-rfvuhz?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"Create a pie chart in Next.js\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n\n<div class=\"wp-block-cloudinary-markdown \"><h2>Project Setup<\/h2>\n<p>Node has to be installed on your computer to set up the Next.js application. To install Node, go to the <a href=\"https:\/\/nodejs.org\/en\/\">Nodejs website<\/a> and follow the instructions to install the software compatible with your operating system.<\/p>\n<p>You can verify the Node.js installation by running the command below:<\/p>\n<pre><code>node -v\nv16.10.0 \/\/node version installed\n<\/code><\/pre>\n<p>To create the Next.js app, run the command below. It will automatically set up a boilerplate Next.js app.<\/p>\n<p><code>npx<\/code> stands for Node Package Execute. It executes any package from the npm registry without installing it.<\/p>\n<pre><code>npx create-next-app@latest &lt;app-name&gt;\n# or\nyarn create next-app &lt;app-name&gt;\n<\/code><\/pre>\n<p>After the installation is complete, change the directory into the app you just created:<\/p>\n<pre><code>cd &lt;app-name&gt;\n<\/code><\/pre>\n<p>Run <code>npm run dev<\/code> or <code>yarn dev<\/code> to start the development server on <code>http:\/\/localhost:3000<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_D6D02CF8B03C42412210DCFD6E1CDFF5C06A3DC4D7010024897EEBF1E682B292_1648074761781_nextjs-app.png\" alt=\"Image of a pie chart as one of the chart.js examples generated through the code instructions in this article\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1251\"\/><\/p>\n<h2>Create Pie Chart With NPM <code>chart.js<\/code> and <code>chart.js react<\/code><\/h2>\n<p>You\u2019ll be using an <code>npm<\/code> package called <code>[Chart.js](https:\/\/www.npmjs.com\/package\/chart.js)<\/code> to create the pie chart in this application. Install it using the command below:<\/p>\n<pre><code>$ npm i chart.js\n<\/code><\/pre>\n<p>After installation is complete, open the <code>index.js<\/code> file in the pages folder and replace the boilerplate code with the code below:<\/p>\n<pre><code>import Chart from 'chart.js\/auto';\nimport { useRef, useEffect } from 'react';\n\nexport default function Home() {\n  const canvas = useRef();\n\n  useEffect(() =&gt; {}, [])\n\n  return (\n    &lt;div className='container'&gt;\n      &lt;canvas ref={canvas}&gt;&lt;\/canvas&gt;\n    &lt;\/div&gt;\n  );\n}\n<\/code><\/pre>\n<p>In the code above, the <a href=\"https:\/\/www.npmjs.com\/package\/chart.js\">Chart.js<\/a> package is first imported. <code>useRef<\/code> and <code>useEffect<\/code> hooks are both imported from the react package. The <code>useRef<\/code> hook creates a reference, and it is then assigned to the <code>ref<\/code> property on the <code>canvas<\/code> element. Subsequently, all the <code>canvas<\/code> element\u2019s available properties and methods will be on the <code>.current<\/code> property of the <code>ref<\/code>.<\/p>\n<p>In the <code>useEffect<\/code> hook, between the curly braces of the arrow function, paste the following code, which will take in a set of configurations and create the pie chart:<\/p>\n<pre><code>import Chart from 'chart.js\/auto';\nimport { useRef, useEffect } from 'react';\nexport default function Home() {\n  ...\n  useEffect(() =&gt; {\n    const ctx = canvas.current;\n\n    let chartStatus = Chart.getChart('myChart');\n      if (chartStatus != undefined) {\n        chartStatus.destroy();\n    }\n\n    const chart = new Chart(ctx, {\n      type: 'pie',\n      data: {\n        labels: ['Lions', 'Monkeys', 'Zebras', 'Eagles', 'Horses'],\n        datasets: [\n          {\n            label: 'Dataset 1',\n            data: [12, 19, 3, 2, 3],\n            backgroundColor: [\n              'rgba(255, 99, 132, 0.2)',\n              'rgba(54, 162, 235, 0.2)',\n              'rgba(255, 206, 86, 0.2)',\n              'rgba(75, 192, 192, 0.2)',\n              'rgba(153, 102, 255, 0.2)',\n              'rgba(255, 159, 64, 0.2)',\n            ],\n            borderColor: [\n              'rgba(255, 99, 132, 1)',\n              'rgba(54, 162, 235, 1)',\n              'rgba(255, 206, 86, 1)',\n              'rgba(75, 192, 192, 1)',\n              'rgba(153, 102, 255, 1)',\n              'rgba(255, 159, 64, 1)',\n            ],\n            borderWidth: 1,\n          },\n        ],\n      },\n      options: {\n        responsive: true,\n        plugins: {\n          legend: {\n            position: 'top',\n          },\n          title: {\n            display: true,\n            text: 'Number of animals in the zoo',\n          },\n        },\n      },\n    });\n  }, []);\n  ...\n}\n<\/code><\/pre>\n<ol>\n<li>The <code>canvas<\/code> element is assigned to a variable called <code>ctx<\/code>. A check is done to ensure a Chart hasn\u2019t been created already. If a Chart already exists, it is then destroyed to create a new Chart. If the previous one isn\u2019t destroyed, it will prevent the initialization and creation of a new Chart object.<\/li>\n<li>A new Chart object is then initialized, which takes in two parameters, the canvas element you want to render the chart on and a set of configurations for how the pie chart will display. The chart type is set to \u2018pie\u2019 in the configuration object.<\/li>\n<li>There is a <code>data<\/code> property where several other configs are set, including labels for the chart, datasets used to define the specific data to be shown, and the background color to distinguish one dataset from another. It also contains a border-color property and border width to set the border\u2019s thickness.<\/li>\n<li>There is an <code>options<\/code> object to define the responsiveness of the chart, it\u2019s positioning, and title.<\/li>\n<\/ol>\n<h1>Rendering the Pie Chart<\/h1>\n<p>In the <code>globals.css<\/code> file in the styles folder, replace the boilerplate code with the code below:<\/p>\n<pre><code>html,\nbody {\n  padding: 0;\n  margin: 0;\n  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,\n    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n}\n\n.container {\n  position: relative;\n  margin: auto;\n  height: 50vh;\n  width: 50vw;\n}\n<\/code><\/pre>\n<p>This code above aligns the parent container of the <code>canvas<\/code> element to the center of the page.<\/p>\n<p>After successfully following the steps above, run the command below in your terminal:<\/p>\n<pre><code> $ npm run dev\n<\/code><\/pre>\n<p>The above command will spin up a development server on <a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a>, which you can use to view the application. See the outcome below as one of the key chart.js examples:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_B4E9E0401FC6E16832D662DE927D8C7711F4C0C20946970B8CFB4748B12C07C6_1652564878431_pie+chart.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1192\"\/><\/p>\n<p>You can hover over the pie sections to get more information about each section.<\/p>\n<h2>Conclusion<\/h2>\n<p>This article showed you code and image chart.js examples on how to create pie charts in Next.js applications using NPM <code>chart.js<\/code> and <code>chart.js<\/code> react.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":28091,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[145,177,212],"class_list":["post-28090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-html5","tag-javascript","tag-next-js"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Next.js Pie Chart | Create a Pie Chart in Next.js<\/title>\n<meta name=\"description\" content=\"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Pie Chart in Next.js\" \/>\n<meta property=\"og:description\" content=\"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-10T07:39:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-23T17:10:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create a Pie Chart in Next.js\",\"datePublished\":\"2022-06-10T07:39:45+00:00\",\"dateModified\":\"2025-10-23T17:10:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\"},\"wordCount\":7,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA\",\"keywords\":[\"HTML5\",\"Javascript\",\"Next.js\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\",\"url\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\",\"name\":\"Next.js Pie Chart | Create a Pie Chart in Next.js\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA\",\"datePublished\":\"2022-06-10T07:39:45+00:00\",\"dateModified\":\"2025-10-23T17:10:32+00:00\",\"description\":\"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA\",\"width\":2560,\"height\":1440,\"caption\":\"Image showing a pie chart labeled create a pie chart in next.js for the chart.js examples article\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Pie Chart in Next.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Next.js Pie Chart | Create a Pie Chart in Next.js","description":"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs","og_locale":"en_US","og_type":"article","og_title":"Create a Pie Chart in Next.js","og_description":"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.","og_url":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs","og_site_name":"Cloudinary Blog","article_published_time":"2022-06-10T07:39:45+00:00","article_modified_time":"2025-10-23T17:10:32+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs"},"author":{"name":"","@id":""},"headline":"Create a Pie Chart in Next.js","datePublished":"2022-06-10T07:39:45+00:00","dateModified":"2025-10-23T17:10:32+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs"},"wordCount":7,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","keywords":["HTML5","Javascript","Next.js"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs","url":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs","name":"Next.js Pie Chart | Create a Pie Chart in Next.js","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","datePublished":"2022-06-10T07:39:45+00:00","dateModified":"2025-10-23T17:10:32+00:00","description":"In this article, you\u2019ll learn the details on how to create and render a Nextjs pie chart using chart.js React and NPM chart.js including chart.js examples.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","width":2560,"height":1440,"caption":"Image showing a pie chart labeled create a pie chart in next.js for the chart.js examples article"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/create-a-pie-chart-in-nextjs#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a Pie Chart in Next.js"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925428\/Web_Assets\/blog\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b\/efd1cfe9067aa245189700bda16d0bac16415edb-2560x1440-1_280914720b.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=28090"}],"version-history":[{"count":2,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28090\/revisions"}],"predecessor-version":[{"id":38986,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28090\/revisions\/38986"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/28091"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=28090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=28090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=28090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}