Under Construction...
CFML QUICKCHART (http://quickchart.io/ )
It's single word "quickchart". An awesome library for preparing charts on the fly. They have very good knowledge base on all the possibility of chart usage and how extensible it is.
As usual, it would be nice to have CFML snippet to render the QUICK chart for email messages. I am sharing what I had for my utilities and daily notifications emails.
Usage:
local.ainput = _.takeWhile(variables.arrObjects, function(row) { return isdefined('row.count')&&row.count gte 1000; });local.labels = _.pluck(local.ainput, 'name'); local.totals = _.pluck(local.ainput, 'count');local.charts = PrepareQuickChart (local.labels, local.totals, 'objects-count-gte-1000');// You will have quickchart Urls for [Line, Bar and Pie Chart] in local.charts struct//local.charts.lineChart//local.charts.pieChart//local.charts.barChart<cffunction name="PrepareQuickChart" access="public" returntype="any"> <cfargument name="labels"> <cfargument name="totals"> <cfargument name="title" default="Chart"> <cfargument name="charttype" default = "all" /> <cfargument name="widthHeight" default = "width=400px&height=200px" /> <cfset labels = IsArray(labels) ? serializeJSON (labels) : labels /> <cfset totals = IsArray(totals) ? serializeJSON (totals) : totals /> <cfset local.chartUrlJson = "{type:'line',data:{labels:#labels#,datasets:[{<lineChartArgs>label:'#title#',data:#totals#}]}}" /> <cfset local.ChartUrl = 'https://quickchart.io/chart?#widthHeight#&c=#decodeForHTML(local.chartUrlJson)#' /> <cfset local.result = {} /> <cfoutput> <cfif listfindNocase ("all,line", charttype)> <cfsavecontent variable="local.result.lineChart"> <!-- line chart --> <img src=#replace(local.ChartUrl, "<lineChartArgs>", "fill:false,type:'line',")# /> </cfsavecontent> </cfif> <cfset local.ChartUrl = replace (local.ChartUrl, "<lineChartArgs>", '') /> <cfif listfindNocase ("all,bar", charttype)> <cfset local.ChartUrlBar = replace (local.ChartUrl, "type:'line'", "type:'bar'") /> <cfsavecontent variable="local.result.barChart"> <!-- bar chart --> <img src=#local.ChartUrlBar# /> </cfsavecontent> </cfif> <cfif listfindNocase ("all,pie", charttype)> <cfset local.ChartUrlPie = replace (local.ChartUrl, "type:'line'", "type:'pie'") /> <cfsavecontent variable="local.result.pieChart"> <!-- pie chart --> <img src=#local.ChartUrlPie# /> </cfsavecontent> </cfif> </cfoutput> <cfreturn local.result /> </cffunction>