在电子邮件中呈现Google Visualization图表

时间:2014-05-12 08:16:43

标签: email grails google-visualization

只是想知道是否有任何人对我如何使用Google可视化渲染使用邮件插件发送的电子邮件图表有任何想法或经验,我目前拥有的是:

MailCashFlow.gsp:

<%@ page contentType="text/html" %>
<html>
<head>
<title>CashFlow Forecast</title>
<gvisualization:apiImport/>
<link rel="stylesheet" type="text/css" href="${resource(dir: 'css', file: 'main2.css')}"/>
<link rel="stylesheet" type="text/css" href="${resource(dir: 'css', file: 'jquery-ui.css')}"/>
</head>
<body>
<p>Warning -  You're cash flow is in the red in the next 30 days!</p>
<%
def companyPerformanceColumns = [['date', 'Year'], ['number', 'Projected Cash']]
def companyPerformanceData = mappings
%>
<gvisualization:areaCoreChart elementId="imageareachart" title="${'Cash Flow Until ' +enddate}" width="${1700}" height="${700}" vAxis="${new Expando(minValue:-2000, baselineColor: 'red')}" hAxis="${new Expando(title: 'Date', titleColor: 'black')}" columns="${companyPerformanceColumns}" data="${companyPerformanceData}" />
<div id="imageareachart"></div>
</body>
</html> 

SendEmail:

mailService.sendMail {
to user.email
subject 'Feoirling - Cash Flow Warning'
body( view:"/report/MailCashFlow",
      model:[mappings: mapping, enddate:endDate.format("dd-MM-yyyy")])
}

但是这并没有显示收到的电子邮件中的图表,任何帮助表示赞赏!

谢谢, 彼得。

0 个答案:

没有答案