2013-10-26 58 views
2

我想在我的asp.net應用程序中繪製餅圖和條形圖以詳細顯示年度報告。有沒有免費的工具可用於此?ASP.Net中的餅圖,條形圖

我已經看到從森林主題的白色標籤主題圖,但這些是付費版本。 Pie Chart Sample Bar Chart Sample

回答

1

餅圖例如:

<%@ 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); 
%> 

條形圖例如:

<%@ 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); 
    %> 

請參考以下鏈接:

http://www.chestysoft.com/aspnetgraph/manual.htm

+0

感謝帕雷克,但卡爾安德森也提出了上述同樣的事情。我們無法顯示使用此服務器控件進行自定義的豐富工具提示。所以,我決定去客戶端的圖表控制。所以,如果有免費的客戶端工具可用,請與我分享。 – Arjun

1

在ASP.NET 4.0及更高版本,還有一個內置的圖表控件,它可以在ASP.NET 3.5 SP1單獨下載。

您可以將圖表(<asp:Chart>)控件從工具箱的Data部分拖動到.aspx頁面上。

閱讀Using Microsoft's Chart Controls In An ASP.NET Application: Getting Started瞭解教程。

+0

是卡爾,而是按照用戶界面,這些不看好,很難定製。我添加了一個來自主題森林的示例圖像,我想要相同的富文本用戶界面,並且應該很容易定製。 – Arjun