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("Programming Language", typeof(System.String));
ChartData.Columns.Add("Users", typeof(System.Double));
ChartData.Rows.Add("Java", 62000);
ChartData.Rows.Add("Python", 46000);
ChartData.Rows.Add("Javascript", 38000);
ChartData.Rows.Add("C++", 31000);
ChartData.Rows.Add("C#", 27000);
ChartData.Rows.Add("PHP", 14000);
ChartData.Rows.Add("Perl", 14000);
StaticSource source = new StaticSource(ChartData);
DataModel model = new DataModel();
model.DataSources.Add(source);
Charts.BarChart bar = new Charts.BarChart("bar_chart");
bar.Caption.Text = "Most popular programming language";
bar.ThemeName = FusionChartsTheme.ThemeName.FUSION;
ViewData["Chart"] = bar.Render();