{"id":28361,"date":"2022-06-10T08:39:02","date_gmt":"2022-06-10T08:39:02","guid":{"rendered":"http:\/\/create-a-bar-chart-in-nuxtjs"},"modified":"2022-06-10T08:39:02","modified_gmt":"2022-06-10T08:39:02","slug":"create-a-bar-chart-in-nuxtjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/","title":{"rendered":"Create a Bar Chart in NuxtJS"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><h1>Introduction<\/h1>\n<p>According to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bar_chart\">Wikipedia<\/a>, a bar chart is a chart that presents categorical data using rectangular bars with heights or lengths proportional to the values that they represent. On one axis of the chart are the categories under comparison, while on the other is the measured value.<\/p>\n<p>At the end of the article, we will have understood how to implement a bar chart into our Nuxt.js application.<\/p>\n<h1>Prerequisites<\/h1>\n<p>To follow along with the article, a basic understanding of Nuxt.js is required.<\/p>\n<h1>Repository<\/h1>\n<p>This article\u2019s source code is available on GitHub:<\/p>\n<p><a href=\"https:\/\/github.com\/folucode\/nuxtjs-barchart\">https:\/\/github.com\/folucode\/nuxtjs-barchart<\/a><\/p>\n<h1>Sandbox<\/h1>\n<p>The completed project is on <a href=\"https:\/\/codesandbox.io\/s\/implement-static-maps-image-embed-with-google-maps-in-next-js-tuv6d4\">CodeS<\/a><a href=\"https:\/\/codesandbox.io\/s\/create-a-bar-chart-in-nuxt-js-im1mxn\">andbox<\/a>. Fork it and run the code.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/create-a-bar-chart-in-nuxt-js-im1mxn?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 bar chart in Nuxt.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  <div class=\"wp-block-cloudinary-markdown \"><h1>Project Setup<\/h1>\n<p><a href=\"https:\/\/nodejs.org\/en\/\">Node<\/a> has to be installed on our computer to set up the Nuxt.js application. To install Node, we\u2019ll head over to the <a href=\"https:\/\/nodejs.org\/en\/\">Nodejs website<\/a> and follow the instructions to install the software compatible with our operating system.<\/p>\n<p>We 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 Nuxt.js app, run the command below. It will automatically set up a boilerplate Nuxt.js app.<\/p>\n<pre><code>$ npm init nuxt-app &lt;project-name&gt;\n# or\n$ yarn create nuxt-app &lt;project-name&gt;\n<\/code><\/pre>\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_4EFD4AC90DAF3361E5FB5E2EE2B800A9C32EF061AF9E3F2148A2B68390388D05_1653150070362_Screenshot+2022-05-21+at+17.20.38.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1364\" height=\"954\"\/><\/p>\n<p>After running the command, we see different options to configure our Nuxt.js app. Make sure to choose the options listed in the image above for each prompt.<\/p>\n<ol>\n<li>For <code>Nuxt.js modules<\/code>, we\u2019ll pick <code>Axios<\/code> as our option.<\/li>\n<li>For <code>Linting tools<\/code>, we\u2019ll pick <code>Prettier<\/code> as our option.<\/li>\n<li>For <code>development tools<\/code>, we\u2019ll pick <code>jsconfig.json<\/code> as our option.<\/li>\n<li>For <code>GitHub username<\/code>, make sure to use <code>GitHub<\/code> username.<\/li>\n<\/ol>\n<p>After the installation is complete, change the directory to the app we 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_4EFD4AC90DAF3361E5FB5E2EE2B800A9C32EF061AF9E3F2148A2B68390388D05_1653150714964_Screenshot+2022-05-21+at+17.30.55.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1630\" height=\"1065\"\/><\/p>\n<h1>Create Bar Chart<\/h1>\n<p>We\u2019ll be using an <code>npm<\/code> package called <code>[Chart.js](https:\/\/www.npmjs.com\/package\/chart.js)<\/code> to create the bar chart in our application. Install it using the command below:<\/p>\n<pre><code>$ npm i chart.js\n<\/code><\/pre>\n<p>After installing the package, we\u2019ll create a new file called <code>BarChart.vue<\/code> in the <code>components<\/code> folder and then copy-paste the code below:<\/p>\n<pre><code>&lt;template&gt;\n    &lt;div&gt;\n        &lt;canvas id=&quot;bar-chart&quot;&gt;&lt;\/canvas&gt;\n    &lt;\/div&gt;\n&lt;\/template&gt;\n&lt;script&gt;\nimport { Chart, registerables } from 'chart.js';\n\nexport default {\n    name: &quot;BarChart&quot;,\n};\n&lt;\/script&gt;\n<\/code><\/pre>\n<p>In the code above, we create a Nuxt.js template and a parent <code>div<\/code>. Inside the parent div, we create a <code>canvas<\/code> element that will later be used to render our chart. Then we import the <a href=\"https:\/\/www.npmjs.com\/package\/chart.js\">Chart.js<\/a> package and export the <code>BarChart<\/code> component.<\/p>\n<p>Next, we create a new folder called <code>data<\/code> at the root of our app, and inside it, create a file called <code>chart-data.js<\/code>. Inside the <code>chart-data.js<\/code>, paste the code below in it:<\/p>\n<pre><code>const barChartData = {\n  type: &quot;bar&quot;,\n  data: {\n    labels: [&quot;Lions&quot;, &quot;Monkeys&quot;, &quot;Zebras&quot;, &quot;Eagles&quot;, &quot;Horses&quot;],\n    datasets: [\n      {\n        label: &quot;Dataset 1&quot;,\n        data: [12, 19, 3, 2, 3],\n        backgroundColor: [\n          &quot;rgba(255, 99, 132, 0.2)&quot;,\n          &quot;rgba(54, 162, 235, 0.2)&quot;,\n          &quot;rgba(255, 206, 86, 0.2)&quot;,\n          &quot;rgba(75, 192, 192, 0.2)&quot;,\n          &quot;rgba(153, 102, 255, 0.2)&quot;,\n          &quot;rgba(255, 159, 64, 0.2)&quot;,\n        ],\n        borderColor: [\n          &quot;rgba(255, 99, 132, 1)&quot;,\n          &quot;rgba(54, 162, 235, 1)&quot;,\n          &quot;rgba(255, 206, 86, 1)&quot;,\n          &quot;rgba(75, 192, 192, 1)&quot;,\n          &quot;rgba(153, 102, 255, 1)&quot;,\n          &quot;rgba(255, 159, 64, 1)&quot;,\n        ],\n        borderWidth: 1,\n      },\n    ],\n  },\n  options: {\n    responsive: true,\n    plugins: {\n      legend: {\n        position: &quot;top&quot;,\n      },\n      title: {\n        display: true,\n        text: &quot;Number of animals in the zoo&quot;,\n      },\n    },\n  },\n};\n\nexport default barChartData;\n<\/code><\/pre>\n<p>In the code above:<\/p>\n<ol>\n<li>Chart type is set to <code>bar<\/code> in the configuration object<\/li>\n<li>Configurations are set in the <code>data<\/code> property and contains charts\u2019 labels, datasets used to define specific data to be shown, and background color to distinguish one dataset from another, also contains a border-color and border width property to set the border\u2019s thickness<\/li>\n<li>\n<code>options<\/code> object to define the responsiveness of the chart, positioning, and title<\/li>\n<\/ol>\n<h1>Rendering the Bar Chart<\/h1>\n<p>To render our bar chart, we will change the content of the <code>BarChart.vue<\/code> component and <code>index.vue<\/code> page.<\/p>\n<ol>\n<li>\n<p>First, in the <code>BarChart.vue<\/code> component, we\u2019ll import the <code>barChartData<\/code> object from the <code>chart-data<\/code> file and then export the <code>data<\/code> property, which returns the <code>barChartData<\/code> object so we can use it in our component.<\/p>\n<\/li>\n<li>\n<p>Then export the <code>mounted<\/code> lifecycle method, and in it, we get the canvas element. All the chart components are registered in the <code>mounted<\/code> lifecycle method, and a new <code>Chart<\/code> object is initialized. The <code>Chart<\/code> object takes in two parameters; the canvas element we want to render the chart on and a configurations object, which in this case is barChartData. <code>Vue<\/code> calls the <code>mounted<\/code> hook when our component is added to the <code>DOM<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>See the completed <code>BarChart.vue<\/code> component code below:<\/p>\n<pre><code>&lt;template&gt;\n    &lt;div&gt;\n        &lt;canvas id=&quot;bar-chart&quot;&gt;&lt;\/canvas&gt;\n    &lt;\/div&gt;\n&lt;\/template&gt;\n\n&lt;script&gt;\nimport { Chart, registerables } from 'chart.js';\nimport barChartData from &quot;..\/data\/chart-data&quot;;\n\nexport default {\n    name: &quot;BarChart&quot;,\n    data() {\n        return {\n            barChartData\n        }\n    },\n    mounted() {\n        const ctx = document.getElementById(&quot;bar-chart&quot;);\n        Chart.register(...registerables);\n        new Chart(ctx, this.barChartData);\n    }\n};\n&lt;\/script&gt;\n<\/code><\/pre>\n<p>Next, in the <code>index.vue<\/code> file, we will replace the boilerplate code with the code below:<\/p>\n<pre><code>&lt;template&gt;\n  &lt;BarChart \/&gt;\n&lt;\/template&gt;\n\n&lt;script&gt;\nimport BarChart from '..\/components\/BarChart.vue';\n\nexport default {\n  name: &quot;IndexPage&quot;,\n  components: { BarChart }\n}\n&lt;\/script&gt;\n<\/code><\/pre>\n<p>We import the <code>BarChart<\/code> component and set it in between the template element. We then export our component <code>name<\/code> and the <code>components<\/code> object, which lists all the components we use in the <code>index.vue<\/code> file.<\/p>\n<p>After successfully following the steps above, we run the command below in our 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 we can use to view the application. Check the image below to see the outcome:<\/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_4EFD4AC90DAF3361E5FB5E2EE2B800A9C32EF061AF9E3F2148A2B68390388D05_1653156173890_Screenshot+2022-05-21+at+19.02.30.png\" alt=\"\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1186\"\/><\/p>\n<p>We can hover over each bar to get more information about that section.<\/p>\n<h1>Conclusion<\/h1>\n<p>This article showed how to create bar charts in Nuxt.js applications using <code>chart.js<\/code>.<\/p>\n<h1>Resources<\/h1>\n<p>You may find these resources helpful:<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/www.chartjs.org\/docs\/latest\/\">Chart.js documentation<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/nuxtjs.org\/docs\/get-started\/installation\">Nuxt.js documetation<\/a>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":28362,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,145,177,372,371,315],"class_list":["post-28361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-html5","tag-javascript","tag-nuxtjs","tag-under-review","tag-vue"],"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>Create a Bar Chart in NuxtJS<\/title>\n<meta name=\"description\" content=\"This article will show how to create a bar chart in NuxtJS\" \/>\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\/guest_post\/create-a-bar-chart-in-nuxtjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Bar Chart in NuxtJS\" \/>\n<meta property=\"og:description\" content=\"This article will show how to create a bar chart in NuxtJS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-10T08:39:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.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\/guest_post\/create-a-bar-chart-in-nuxtjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create a Bar Chart in NuxtJS\",\"datePublished\":\"2022-06-10T08:39:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA\",\"keywords\":[\"Guest Post\",\"HTML5\",\"Javascript\",\"NuxtJS\",\"Under Review\",\"Vue\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\",\"name\":\"Create a Bar Chart in NuxtJS\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA\",\"datePublished\":\"2022-06-10T08:39:02+00:00\",\"description\":\"This article will show how to create a bar chart in NuxtJS\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA\",\"width\":2560,\"height\":1440},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Bar Chart in NuxtJS\"}]},{\"@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":"Create a Bar Chart in NuxtJS","description":"This article will show how to create a bar chart in NuxtJS","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\/guest_post\/create-a-bar-chart-in-nuxtjs\/","og_locale":"en_US","og_type":"article","og_title":"Create a Bar Chart in NuxtJS","og_description":"This article will show how to create a bar chart in NuxtJS","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-06-10T08:39:02+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/"},"author":{"name":"","@id":""},"headline":"Create a Bar Chart in NuxtJS","datePublished":"2022-06-10T08:39:02+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/"},"wordCount":6,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","keywords":["Guest Post","HTML5","Javascript","NuxtJS","Under Review","Vue"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/","name":"Create a Bar Chart in NuxtJS","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","datePublished":"2022-06-10T08:39:02+00:00","description":"This article will show how to create a bar chart in NuxtJS","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","width":2560,"height":1440},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-a-bar-chart-in-nuxtjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a Bar Chart in NuxtJS"}]},{"@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\/v1681924691\/Web_Assets\/blog\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b\/53f231e39b965ea775171f3405b803087ed2c4f9-2560x1440-1_2836275c6b.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28361","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=28361"}],"version-history":[{"count":0,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/28362"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=28361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=28361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=28361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}