Google Charts with MVC3

In this blog I am going to talk about how to add the powerfull Google Charts to your MVC 3 Application. Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.

Step 1: Create a new project

Go to File –> New Project –> Web –> Asp.Net MVC 3 Application

Step 2:Javascript files and libraries

add the following javascript files to head of your page

Step 3: Add Client Javascript and Html

Note here we are making an ajax request to “/Home/GetData” to get data from server and assign data to google chart api

Step 4: Add ServerSide

That’s all. You can download the sample from here

One Reply to “Google Charts with MVC3”

  1. Hi
    good article but my chart is not working after publishing on server…………

    Thanks ……………

Comments are closed.