Download Source Code - Visitor Stats Using Google Charts

Are you looking for an ASP.NET C sharp solution that can display website visitor statistics in a graphical format? If so then you’ve come to the right place. The provided project reads a CSV file of site traffic summarized by country. The file is then parse to retrieve both the country and the number of hits per country. This information is then converted into a DataTable format that’s understood by Google Chart Tools. Using Google’s Visualization API, the statistical data from the CSV file is rendered as both a pie chart and a bar chart on the same web page.
Google Chart Tools allows you to visualize data on your website using either simple line charts or complex hierarchical tree maps. The chart galley provides a large number of interesting chart types. Charts are exposed as JavaScript classes. Google Chart Tools provides many chart types that can be easily integrated into your web site. All charts are populated with data using a common JavaScript DataTable class.
There are two different types of graphs that Chart Tools can generate: image charts (static graphs) and interactive charts. Interactive charts are more flexible because they can trigger events, which your visitors can use to interact with elements on the page. The provided C# ASP.NET project implemented a pie and a bar chart as interactive charts. If you MouseOver the charts, additional details will be revealed.
Interactive charts can be included into your web page by using the Google Visualization API. The level of interactivity depends on the particular visualizations you use. Usually, the graph will react in a certain way when clicked. However, a great feature is that they can trigger events and you can register callbacks to perform any action related to that event. You can visit code.google.com to get more information about setting up events.
The provided demo reads data from a CSV file (App_Data/visitor-data.csv) but you can easily modify the code-behind page to pull the data from a database or another source. The Default.aspx.cs file is well documented so that you can see how it works in order to make any changes. If you provide your own CSV file, ensure that it follows the same format and it should not include column headers.
You can get the full ASP.NET C# source code for this project by selecting the download link below.
Download Source Code - Visitor Stats Using Google Charts