using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using FusionCharts.Visualization;
using FusionCharts.DataEngine;
namespace FusionChartsSamples
public class HomeController : Controller
public ActionResult Index()
DataTable ChartData = new DataTable();
ChartData.Columns.Add("Day", typeof(System.String));
ChartData.Columns.Add("Sales", typeof(System.Double));
ChartData.Rows.Add("Mon", 4123);
ChartData.Rows.Add("Tue", 4633);
ChartData.Rows.Add("Wed", 5507);
ChartData.Rows.Add("Thu", 4910);
ChartData.Rows.Add("Fri", 5529);
ChartData.Rows.Add("Sat", 5803);
ChartData.Rows.Add("Sun", 6202);
StaticSource source = new StaticSource(ChartData);
DataModel model = new DataModel();
model.DataSources.Add(source);
Charts.AreaChart area = new Charts.AreaChart("area_chart_db");
area.ThemeName = FusionChartsTheme.ThemeName.FUSION;
area.Data.Source = model;
area.Caption.Text = "Sales of Liquor";
area.Caption.Bold = true;
area.SubCaption.Text = "Last week";
area.YAxis.Text = "Sales";
area.Legend.Show = false;
area.ThemeName = FusionChartsTheme.ThemeName.FUSION;
ViewData["Chart"] = area.Render();