自动生成highcharts图像的最佳方式

时间:2015-10-05 13:59:15

标签: asp.net asp.net-mvc azure highcharts

我的应用程序上有一些图表,我需要自动生成图像(例如:按日)以通过电子邮件发送。

环境

  • ASP.NET MVC for website
  • Highcharts
  • 在天蓝色网站上托管

我正在使用highcharts,首选是服务器导出模块,但是使用azure网站我无法在服务器上设置phantomjs。

我还研究了“谷歌图表图片”,但它已被弃用。

我正在考虑使用Chart(System.Web.Helpers):

E.g:

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。

1 个答案:

答案 0 :(得分:0)

在服务器上为 Azure Web App 生成图表的唯一方法 - >使用ms-chart。 您只能使用 Azure VM 在服务器上生成高级图表。

相关问题