{"id":114,"date":"2015-09-02T21:29:39","date_gmt":"2015-09-02T21:29:39","guid":{"rendered":"http:\/\/blazingspider.com\/wp-demo\/?p=114"},"modified":"2016-09-01T21:25:47","modified_gmt":"2016-09-01T21:25:47","slug":"chart-js-sample-polar-area-chart","status":"publish","type":"post","link":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/","title":{"rendered":"Chart.js Sample: Polar Area Chart"},"content":{"rendered":"<p>Polar area charts are similar to pie charts, but each segment has the same angle &#8211; the radius of the segment differs depending on the value.<\/p>\n<p>This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context.<\/p>\n<p>The following Polar Area Chart, drawn by Chart.js library:<\/p>\n<p><!--more--><\/p>\n<div id=\"canvas-holder\" style=\"width:30%; direction: ltr; margin-left:auto;margin-right:auto;display:table;\">\r\n\t<canvas id=\"chart-area\" width=\"300\" height=\"300\"\/>\r\n<\/div>\r\n<script>\r\nvar polarData = {\r\n    labels: [\r\n        \"Red\",\r\n        \"Blue\",\r\n        \"Yellow\",\r\n        \"Grey\",\r\n        \"Dark Grey\"\r\n    ],\r\n    datasets: [\r\n        {\r\n            data: [300, 50, 100, 40, 120],\r\n            backgroundColor: [\r\n                \"#F7464A\",\r\n                \"#46BFBD\",\r\n                \"#FDB45C\",\r\n                \"#949FB1\",\r\n                \"#4D5360\"\r\n            ],\r\n            hoverBackgroundColor: [\r\n                \"#FF5A5E\",\r\n                \"#5AD3D1\",\r\n                \"#FFC870\",\r\n                \"#A8B3C5\",\r\n                \"#616774\"\r\n            ]\r\n        }]\r\n};\r\n\r\n\r\nwindow.onload = function(){\r\n\tvar ctx = document.getElementById(\"chart-area\").getContext(\"2d\");\r\n\r\n    window.myPolarArea = new Chart(ctx, {\r\n        type: 'polarArea',\r\n        data: polarData,\r\n        options: {\r\n            responsive: true,\r\n            elements: {\r\n                arc: {\r\n                    borderColor: \"#000000\"\r\n                }\r\n            }\r\n         },\r\n        animation:{\r\n            animateScale: true\r\n        }\r\n    });\r\n};\r\n<\/script>\n<p>Using our plugin, named <em>Blazing Charts<\/em>, I added the following shortcode to this post:<\/p>\n<pre>(left-bracket)BlazingChart charttype=\"chartjs\" source=\"chart-js-sample-1\"(right bracket)<\/pre>\n<p>The first parameter specifies which charting library is used. The second parameter is the slug of a Custom Post Type, named <em>Chart Snippets<\/em>, introduced by that plugin.<\/p>\n<p>The source of the script for the drawing is added as plain text to a Chart Snippet. The content of the chart snippet for the above chart is as following:<\/p>\n<pre lang=\"html\" toggle=\"no\">\r\n&lt;div id=\"canvas-holder\" style=\"width:30%; direction: ltr; margin-left:auto;margin-right:auto;display:table;\"&gt;\r\n\t&lt;canvas id=\"chart-area\" width=\"300\" height=\"300\"\/&gt;\r\n&lt;\/div&gt;\r\n&lt;script&gt;\r\nvar polarData = {\r\n    labels: [\r\n        \"Red\",\r\n        \"Green\",\r\n        \"Yellow\",\r\n        \"Grey\",\r\n        \"Dark Grey\"\r\n    ],\r\n    datasets: [\r\n        {\r\n            data: [300, 50, 100, 40, 120],\r\n            backgroundColor: [\r\n                \"#F7464A\",\r\n                \"#46BFBD\",\r\n                \"#FDB45C\",\r\n                \"#949FB1\",\r\n                \"#4D5360\"\r\n            ],\r\n            hoverBackgroundColor: [\r\n                \"#FF5A5E\",\r\n                \"#5AD3D1\",\r\n                \"#FFC870\",\r\n                \"#A8B3C5\",\r\n                \"#616774\"\r\n            ]\r\n        }]\r\n};\r\n\r\n\r\nwindow.onload = function(){\r\n\tvar ctx = document.getElementById(\"chart-area\").getContext(\"2d\");\r\n\r\n    window.myPolarArea = new Chart(ctx, {\r\n        type: 'polarArea',\r\n        data: polarData,\r\n        options: {\r\n            responsive: true,\r\n            elements: {\r\n                arc: {\r\n                    borderColor: \"#000000\"\r\n                }\r\n            }\r\n         },\r\n        animation:{\r\n            animateScale: true\r\n        }\r\n    });\r\n};\r\n&lt;\/script&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Polar area charts are similar to pie charts, but each segment has the same angle &#8211; the radius of the segment differs depending on the value. This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context. &hellip; <a href=\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Chart.js Sample: Polar Area Chart<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,9],"tags":[22],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-chart-js","category-chart-libraries","tag-chart-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Chart.js Sample: Polar Area Chart - WordPress Demo<\/title>\n<meta name=\"description\" content=\"Wordpress plugin &quot;Blazing Charts&quot; helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chart.js Sample: Polar Area Chart - WordPress Demo\" \/>\n<meta property=\"og:description\" content=\"Wordpress plugin &quot;Blazing Charts&quot; helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\" \/>\n<meta property=\"og:site_name\" content=\"WordPress Demo\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/blazingspider\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-02T21:29:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-01T21:25:47+00:00\" \/>\n<meta name=\"author\" content=\"massoud Shakeri\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BlazingSpider\" \/>\n<meta name=\"twitter:site\" content=\"@BlazingSpider\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"massoud Shakeri\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\",\"url\":\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\",\"name\":\"Chart.js Sample: Polar Area Chart - WordPress Demo\",\"isPartOf\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#website\"},\"datePublished\":\"2015-09-02T21:29:39+00:00\",\"dateModified\":\"2016-09-01T21:25:47+00:00\",\"author\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd\"},\"description\":\"Wordpress plugin \\\"Blazing Charts\\\" helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.\",\"breadcrumb\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blazingspider.com\/wp-demo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chart.js Sample: Polar Area Chart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#website\",\"url\":\"https:\/\/blazingspider.com\/wp-demo\/\",\"name\":\"WordPress Demo\",\"description\":\"Blazing Spider WordPress Demo\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blazingspider.com\/wp-demo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd\",\"name\":\"massoud Shakeri\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f3d05ee01040cb3ff9bd45b9a45027330209a9a0807f4ad9b195ec7f678f333?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f3d05ee01040cb3ff9bd45b9a45027330209a9a0807f4ad9b195ec7f678f333?s=96&d=mm&r=g\",\"caption\":\"massoud Shakeri\"},\"sameAs\":[\"http:\/\/blazingspider.com\"],\"url\":\"https:\/\/blazingspider.com\/wp-demo\/author\/massoudshakeri\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Chart.js Sample: Polar Area Chart - WordPress Demo","description":"Wordpress plugin \"Blazing Charts\" helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.","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:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/","og_locale":"en_US","og_type":"article","og_title":"Chart.js Sample: Polar Area Chart - WordPress Demo","og_description":"Wordpress plugin \"Blazing Charts\" helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.","og_url":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/","og_site_name":"WordPress Demo","article_publisher":"https:\/\/www.facebook.com\/blazingspider","article_published_time":"2015-09-02T21:29:39+00:00","article_modified_time":"2016-09-01T21:25:47+00:00","author":"massoud Shakeri","twitter_card":"summary_large_image","twitter_creator":"@BlazingSpider","twitter_site":"@BlazingSpider","twitter_misc":{"Written by":"massoud Shakeri","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/","url":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/","name":"Chart.js Sample: Polar Area Chart - WordPress Demo","isPartOf":{"@id":"https:\/\/blazingspider.com\/wp-demo\/#website"},"datePublished":"2015-09-02T21:29:39+00:00","dateModified":"2016-09-01T21:25:47+00:00","author":{"@id":"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd"},"description":"Wordpress plugin \"Blazing Charts\" helps you to use already available Charting Libraries. It saves the snippets of charts in database as a post type.","breadcrumb":{"@id":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blazingspider.com\/wp-demo\/114\/chart-js-sample-polar-area-chart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blazingspider.com\/wp-demo\/"},{"@type":"ListItem","position":2,"name":"Chart.js Sample: Polar Area Chart"}]},{"@type":"WebSite","@id":"https:\/\/blazingspider.com\/wp-demo\/#website","url":"https:\/\/blazingspider.com\/wp-demo\/","name":"WordPress Demo","description":"Blazing Spider WordPress Demo","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blazingspider.com\/wp-demo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd","name":"massoud Shakeri","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f3d05ee01040cb3ff9bd45b9a45027330209a9a0807f4ad9b195ec7f678f333?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f3d05ee01040cb3ff9bd45b9a45027330209a9a0807f4ad9b195ec7f678f333?s=96&d=mm&r=g","caption":"massoud Shakeri"},"sameAs":["http:\/\/blazingspider.com"],"url":"https:\/\/blazingspider.com\/wp-demo\/author\/massoudshakeri\/"}]}},"_links":{"self":[{"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":2,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":182,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts\/114\/revisions\/182"}],"wp:attachment":[{"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}