{"id":123,"date":"2015-09-03T00:35:40","date_gmt":"2015-09-03T00:35:40","guid":{"rendered":"http:\/\/blazingspider.com\/wp-demo\/?p=123"},"modified":"2015-09-03T00:35:40","modified_gmt":"2015-09-03T00:35:40","slug":"chartist-js-sample-line-chart","status":"publish","type":"post","link":"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/","title":{"rendered":"Chartist.js Sample: A Line Chart"},"content":{"rendered":"<p>The following Line Chart, drawn by Chartist.js library:<\/p>\n<p><!--more--><\/p>\n<div class=\"chart\" style=\"direction:ltr;\">\r\n<div class=\"ct-chart\" style=\"width:100%; height:400px;\"><\/div>\r\n<\/div>\r\n\r\n<script type=\"text\/javascript\">\r\nwindow.onload = function () {\r\n  new Chartist.Line('.ct-chart', {\r\n    labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],\r\n    series: [\r\n      [12, 9, 7, 8, 5],\r\n      [2, 1, 3.5, 7, 3],\r\n      [1, 3, 4, 5, 6]\r\n    ]\r\n  }, {\r\n    fullWidth: true,\r\n    chartPadding: {\r\n      right: 40\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=\"chartist\" source=\"chartist-chart-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.<br \/>\nFor Right-To-Left languages, I would suggest to add style=&#8221;direction:ltr;&#8221; to the container div.<\/p>\n<pre lang=\"html\" toggle=\"no\">\r\n&lt;div class=\"chart\" style=\"direction:ltr;\"&gt;\r\n&lt;div class=\"ct-chart\" style=\"width:100%; height:400px;\"&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\nwindow.onload = function () {\r\n  new Chartist.Line('.ct-chart', {\r\n    labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],\r\n    series: [\r\n      [12, 9, 7, 8, 5],\r\n      [2, 1, 3.5, 7, 3],\r\n      [1, 3, 4, 5, 6]\r\n    ]\r\n  }, {\r\n    fullWidth: true,\r\n    chartPadding: {\r\n      right: 40\r\n    }\r\n  });\r\n}\r\n&lt;\/script&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following Line Chart, drawn by Chartist.js library:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,14],"tags":[23],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-chart-libraries","category-chartist-js","tag-chartist-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Chartist.js Sample: A Line Chart - WordPress Demo<\/title>\n<meta name=\"description\" content=\"Wordpress plugin &quot;Blazing Charts&quot; helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries\" \/>\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\/123\/chartist-js-sample-line-chart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chartist.js Sample: A Line Chart - WordPress Demo\" \/>\n<meta property=\"og:description\" content=\"Wordpress plugin &quot;Blazing Charts&quot; helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-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-03T00:35:40+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\/123\/chartist-js-sample-line-chart\/\",\"url\":\"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/\",\"name\":\"Chartist.js Sample: A Line Chart - WordPress Demo\",\"isPartOf\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#website\"},\"datePublished\":\"2015-09-03T00:35:40+00:00\",\"author\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd\"},\"description\":\"Wordpress plugin \\\"Blazing Charts\\\" helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries\",\"breadcrumb\":{\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blazingspider.com\/wp-demo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chartist.js Sample: A Line 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":"Chartist.js Sample: A Line Chart - WordPress Demo","description":"Wordpress plugin \"Blazing Charts\" helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries","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\/123\/chartist-js-sample-line-chart\/","og_locale":"en_US","og_type":"article","og_title":"Chartist.js Sample: A Line Chart - WordPress Demo","og_description":"Wordpress plugin \"Blazing Charts\" helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries","og_url":"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/","og_site_name":"WordPress Demo","article_publisher":"https:\/\/www.facebook.com\/blazingspider","article_published_time":"2015-09-03T00:35:40+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\/123\/chartist-js-sample-line-chart\/","url":"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/","name":"Chartist.js Sample: A Line Chart - WordPress Demo","isPartOf":{"@id":"https:\/\/blazingspider.com\/wp-demo\/#website"},"datePublished":"2015-09-03T00:35:40+00:00","author":{"@id":"https:\/\/blazingspider.com\/wp-demo\/#\/schema\/person\/78f615e83cf347ec4b200f825ba2fecd"},"description":"Wordpress plugin \"Blazing Charts\" helps you to use chatist.js Charting Library in a post or widget, as well as many other libraries","breadcrumb":{"@id":"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blazingspider.com\/wp-demo\/123\/chartist-js-sample-line-chart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blazingspider.com\/wp-demo\/"},{"@type":"ListItem","position":2,"name":"Chartist.js Sample: A Line 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\/123","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=123"}],"version-history":[{"count":2,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":126,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/posts\/123\/revisions\/126"}],"wp:attachment":[{"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blazingspider.com\/wp-demo\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}