{"id":869,"date":"2016-09-05T13:56:51","date_gmt":"2016-09-05T20:56:51","guid":{"rendered":"http:\/\/www.keganv.com\/?p=869"},"modified":"2016-09-05T14:02:39","modified_gmt":"2016-09-05T21:02:39","slug":"simple-funnel-chart-svg-javascript","status":"publish","type":"post","link":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/","title":{"rendered":"Simple Funnel Chart Using SVG &#038; Javascript"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.keganv.com\/wp-content\/uploads\/funnel-chart-e1473108647591.png\" alt=\"Funnel Chart\" width=\"700\" height=\"383\" class=\"aligncenter size-full wp-image-880\" \/>Hey fellow brovelopers! Recently, I was tasked with requirements of creating a sales funnel widget for a CRM that I am working in. I checked around in the internet and found a lot of great options, but in the end they were all too &#8220;heavy&#8221; for my needs. I didn&#8217;t want to have to link or incorporate and entire javascript library for the need of just one type of graph. I wanted something lightweight and simple, so I created my own simple funnel chart that utilizes SVG and JavaScript.<br \/>\n<!--more--><\/p>\n<p>The funnel chart is scalable with as many levels or stages that you want to include and resizes automatically depending on your view port.<\/p>\n<p>The JavaScript is set up in an object oriented style with a constructer function that accepts a single parent array of data. How you choose to pass that data to the class is completely up to you. I&#8217;ve also created the base html necessary for the graph to build, just drop it into your (html) template or view file.<\/p>\n<p>I have documented and placed all the code <a href=\"https:\/\/github.com\/keganv\/simple-funnel-chart\" target=\"_blank\">on GitHub<\/a> for download. Let me know if you use it in your project! I would love feedback and to see it implemented!<\/p>\n<p><a href=\"https:\/\/www.keganv.com\/projects\/funnel-chart\/\" target=\"_blank\" class=\"button center\">View Demo<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/keganv\/simple-funnel-chart\/archive\/master.zip\" class=\"button center\">Download Files<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Hey fellow brovelopers! Recently, I was tasked with requirements of creating a sales funnel widget for a CRM that I am working in. I checked around in the internet and found a lot of great options, but in the end they were all too &#8220;heavy&#8221; for my needs. I didn&#8217;t want to have to link &#8230; <br\/> <a class=\"view-article btn btn-primary flip pull-left\" href=\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\"><span>View Article<\/span><\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-869","post","type-post","status-publish","format-standard","hentry","category-coding-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Simple Funnel Chart Using SVG &amp; Javascript | KeganV<\/title>\n<meta name=\"description\" content=\"Check out and download my free simple funnel chart using SVG &amp; Javascript. There is no library to include, lightweight and easy to configure!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simple Funnel Chart Using SVG &amp; Javascript | KeganV\" \/>\n<meta property=\"og:description\" content=\"Check out and download my free simple funnel chart using SVG &amp; Javascript. There is no library to include, lightweight and easy to configure!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"KeganV\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-05T20:56:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-05T21:02:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.keganv.com\/wp-content\/uploads\/funnel-chart-e1473108647591.png\" \/>\n<meta name=\"author\" content=\"Kegan V.\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kegan V.\" \/>\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\":\"Article\",\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\"},\"author\":{\"name\":\"Kegan V.\",\"@id\":\"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276\"},\"headline\":\"Simple Funnel Chart Using SVG &#038; Javascript\",\"datePublished\":\"2016-09-05T20:56:51+00:00\",\"dateModified\":\"2016-09-05T21:02:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\"},\"wordCount\":213,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276\"},\"articleSection\":[\"Coding &amp; Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\",\"url\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\",\"name\":\"Simple Funnel Chart Using SVG & Javascript | KeganV\",\"isPartOf\":{\"@id\":\"https:\/\/www.keganv.com\/#website\"},\"datePublished\":\"2016-09-05T20:56:51+00:00\",\"dateModified\":\"2016-09-05T21:02:39+00:00\",\"description\":\"Check out and download my free simple funnel chart using SVG & Javascript. There is no library to include, lightweight and easy to configure!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.keganv.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simple Funnel Chart Using SVG &#038; Javascript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.keganv.com\/#website\",\"url\":\"https:\/\/www.keganv.com\/\",\"name\":\"KeganV\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.keganv.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276\",\"name\":\"Kegan V.\",\"logo\":{\"@id\":\"https:\/\/www.keganv.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.keganv.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Simple Funnel Chart Using SVG & Javascript | KeganV","description":"Check out and download my free simple funnel chart using SVG & Javascript. There is no library to include, lightweight and easy to configure!","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:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Simple Funnel Chart Using SVG & Javascript | KeganV","og_description":"Check out and download my free simple funnel chart using SVG & Javascript. There is no library to include, lightweight and easy to configure!","og_url":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/","og_site_name":"KeganV","article_published_time":"2016-09-05T20:56:51+00:00","article_modified_time":"2016-09-05T21:02:39+00:00","og_image":[{"url":"http:\/\/www.keganv.com\/wp-content\/uploads\/funnel-chart-e1473108647591.png"}],"author":"Kegan V.","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kegan V.","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#article","isPartOf":{"@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/"},"author":{"name":"Kegan V.","@id":"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276"},"headline":"Simple Funnel Chart Using SVG &#038; Javascript","datePublished":"2016-09-05T20:56:51+00:00","dateModified":"2016-09-05T21:02:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/"},"wordCount":213,"commentCount":0,"publisher":{"@id":"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276"},"articleSection":["Coding &amp; Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/","url":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/","name":"Simple Funnel Chart Using SVG & Javascript | KeganV","isPartOf":{"@id":"https:\/\/www.keganv.com\/#website"},"datePublished":"2016-09-05T20:56:51+00:00","dateModified":"2016-09-05T21:02:39+00:00","description":"Check out and download my free simple funnel chart using SVG & Javascript. There is no library to include, lightweight and easy to configure!","breadcrumb":{"@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.keganv.com\/simple-funnel-chart-svg-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.keganv.com\/"},{"@type":"ListItem","position":2,"name":"Simple Funnel Chart Using SVG &#038; Javascript"}]},{"@type":"WebSite","@id":"https:\/\/www.keganv.com\/#website","url":"https:\/\/www.keganv.com\/","name":"KeganV","description":"","publisher":{"@id":"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.keganv.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.keganv.com\/#\/schema\/person\/412e7755f594475dc403b6d774b80276","name":"Kegan V.","logo":{"@id":"https:\/\/www.keganv.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.keganv.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/posts\/869"}],"collection":[{"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/comments?post=869"}],"version-history":[{"count":18,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/posts\/869\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/posts\/869\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/categories?post=869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.keganv.com\/api\/wp\/v2\/tags?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}