Reputation: 633
I want to draw pie chart and Bar Chart in my asp.net application to show the annual reports in detail. Is there is any free tools available for this?
I have seen white label theme graphs from forest theme, but these are paid versions.
Upvotes: 2
Views: 3968
Reputation: 2210
Pie chart example:
<%@ Page language="c#" debug="true" %>
<%@ import Namespace = "csASPNetGraph" %>
<%
Response.Buffer = true;
Response.Expires = 0;
Response.Clear();
GraphClass Graph = new GraphClass();
Graph.Title = "Pie Chart Example";
Graph.AddData("Item 1", 17, "ff0000");
Graph.AddData("Item 2", 28, "00ff00");
Graph.AddData("Item 3", 5, "0000ff");
Graph.GraphType = 0;
Graph.GraphToBrowser(1);
%>
Bar chart example:
<%@ Page language="c#" debug="true" %>
<%@ import Namespace = "csASPNetGraph" %>
<%
Response.Buffer = true;
Response.Expires = 0;
Response.Clear();
GraphClass Graph = new GraphClass();
Graph.Title = "Bar Chart Example";
Graph.TitleX = 120;
Graph.ShowBarTotal = true;
Graph.AddData("Item 1", 17, "ff0000");
Graph.AddData("Item 2", 28, "00ff00");
Graph.AddData("Item 3", 5, "0000ff");
Graph.GraphType = 1;
Graph.GraphToBrowser(1);
%>
Refer following link:
http://www.chestysoft.com/aspnetgraph/manual.htm
Upvotes: 1
Reputation: 34846
In ASP.NET 4.0 and later, there is a built-in chart control, it is available as a separate download in ASP.NET 3.5 SP1.
You can drag a Chart (<asp:Chart>
) control right from the Data
section of the toolbox onto your .aspx page.
Read Using Microsoft's Chart Controls In An ASP.NET Application: Getting Started for a tutorial.
Upvotes: 1