【发布时间】:2015-10-05 13:59:15
【问题描述】:
我的应用上有一些图表,我需要自动生成图像(例如:按天)以通过电子邮件发送。
环境
- 用于网站的 ASP.NET MVC
- Highcharts
- 托管在 azure 网站上
我正在使用 highcharts,首选是服务器导出模块,但是使用 azure 网站我无法在服务器上设置 phantomjs。
我还研究了“谷歌图表图像”,但它已被弃用。
我正在考虑使用 Chart (System.Web.Helpers):
例如:
public ActionResult GetChartImage()
{
var key = new Chart(width: 300, height: 300)
.AddTitle("Employee Chart")
.AddSeries(
chartType: "Bubble",
name: "Employee",
xValue: new[] { "Peter", "Andrew", "Julie", "Dave" },
yValues: new[] { "2", "7", "5", "3" });
return File(key.ToWebImage().GetBytes(), "image/jpeg");
}
但想知道是否还有其他选项可以继续使用 Highcharts。
【问题讨论】:
-
嗨,这正是我需要做的(除了 Azure)。你有没有使用 highcharts 找到解决方案?
-
@dreza 很遗憾没有,目前此要求不再需要。如果您需要使用 highcharts,您将需要一个 VM。
标签: asp.net asp.net-mvc azure highcharts