本文介绍了使用C#在asp.net 2.0中创建条形图和饼图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, i想在我的应用程序中使用条形图和饼图控件 用于生成报告,我使用的是视觉效果studio 2005(框架工作2.0)。 所以,请帮我知道如何控制这个控件以及从哪里获得。 因为这些控件在工具箱中不可用。 谢谢, Raj 解决方案 使用此链接,其用途各不相同 http://www.fusioncharts。 com / products / suite /?gclid = CIm6qcDLg7gCFawF4godkgsAZg [ ^ ] Imran Parvez 经理(IT) MCPD,MCTS 博帕尔 Hi Raj, 使用此代码使用融合库: - Dim pieChart 作为 新 FusionPieChart() pieChart.showNames = True pieChart.showPercentageInLabel = True pieChart.showPercentageValues = 错误 Dim chartHtml 作为 字符串 = pieChart.CreateSetElement(BuildData(),FusionPieChart.Pie3D,divPieChart.ClientID, name, value, text,_ id, test.aspx?id =, True , 600 , 400 ) divPieChart.InnerHtml = chartHtml Dim lineChart 作为 新 FusionLineChart() chartHtml = lineChart.CreateSetElement(BuildData(),FusionLineChart.Line2D,divLineChart.ClientID, False , , 名称,_ value, text, id, , True , 600 ,_ 400 ) divLineChart.InnerHtml = chartHtml Imran Parvez 经理(IT) MCPD,MCTS 博帕尔 C#解决方案 protected void btnShow_Click(object sender,EventArgs e) { FusionPieChart pieChart = new FusionPieChart(); pieChart.showNames = true; pieChart.showPercentageInLabel = true; pieChart.showPercentageValues = false; string chartHtml = pieChart .CreateSetElement(BuildData(),FusionPieChart.Pie3D, divPieChart.ClientID,name,value, text,id,test。 aspx?id =,true,600,400); divPieChart.InnerHtml = chartHtml; FusionLineChart lineChart = new FusionLineChart() ; // chartHtml = lineChart.CreateSetElememtForTrendChart(BuildData() , divLineChart.ClientID,name,value,100,100); chartHtml = lineChart.CreateSetElement(BuildData(),FusionLineChart.Line2D, divLineChart.ClientID,false,,name, value,text,id,,true,600,400); divLineChart.InnerHtml = chartHtml; } Imran Parvez 经理( IT) MCPD,MCTS 博帕尔 Hi all,i want to use Bar chart and pie chart controls in my application for generating reports and i am using visual studio 2005 (frame work 2.0).so, pls help me that how to this controls and where from i can get.because these controls are not available in toolbox.Thanks,Raj 解决方案 use this link its vary use full http://www.fusioncharts.com/products/suite/?gclid=CIm6qcDLg7gCFawF4godkgsAZg[^]Imran ParvezManager(IT)MCPD, MCTSBhopalHi Raj, Use this code with using fusion library:-Dim pieChart As New FusionPieChart() pieChart.showNames = True pieChart.showPercentageInLabel = True pieChart.showPercentageValues = False Dim chartHtml As String = pieChart.CreateSetElement(BuildData(), FusionPieChart.Pie3D, divPieChart.ClientID, "name", "value", "text", _ "id", "test.aspx?id=", True, 600, 400) divPieChart.InnerHtml = chartHtml Dim lineChart As New FusionLineChart() chartHtml = lineChart.CreateSetElement(BuildData(), FusionLineChart.Line2D, divLineChart.ClientID, False, "", "name", _ "value", "text", "id", "", True, 600, _ 400) divLineChart.InnerHtml = chartHtmlImran ParvezManager(IT)MCPD, MCTSBhopalC# Solutionprotected void btnShow_Click(object sender, EventArgs e){ FusionPieChart pieChart = new FusionPieChart(); pieChart.showNames = true; pieChart.showPercentageInLabel = true; pieChart.showPercentageValues = false; string chartHtml = pieChart.CreateSetElement(BuildData(), FusionPieChart.Pie3D, divPieChart.ClientID, "name", "value", "text", "id", "test.aspx?id=", true, 600, 400); divPieChart.InnerHtml = chartHtml; FusionLineChart lineChart = new FusionLineChart(); //chartHtml = lineChart.CreateSetElememtForTrendChart(BuildData(), divLineChart.ClientID, "name", "value", 100, 100); chartHtml = lineChart.CreateSetElement(BuildData(), FusionLineChart.Line2D, divLineChart.ClientID, false, "", "name", "value", "text", "id", "", true, 600, 400); divLineChart.InnerHtml = chartHtml;}Imran ParvezManager(IT)MCPD, MCTSBhopal 这篇关于使用C#在asp.net 2.0中创建条形图和饼图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-18 14:24