Ramesh Vimal Rajesh 然后我有一个按钮生成图表。当我clcik生成图表按钮时,数据将显示在图表中。 好​​ 优秀 公平 差 Suresh Ramesh Vimal Rajesh 我怎么能用图形图表显示。 请帮帮我。 问候, Narasiman P.select Faculty_Name = (select top 1 facname from faculty where facid = bfid), Rating = (case rate when ''1'' then ''Excellent'' when ''2'' then ''Good'' when ''3'' then ''Fair'' when ''4'' then ''Poor'' when ''0'' then ''Not Applicable'' end) from facfeedback using my above query output as follows; Faculty Name Rating Suresh Good Ramesh Excellent Vimal fair Rajesh Poor i want to show the above output using graphical chart in asp.net using csharp. In x axis i want to show the Faculty Name In y axis i want to show the Rating how can i show using graphical chart in asp.net using csharp.Run mode screen as follows; From Date Calendar1 To Date Calendar2 i have one Listbox as follows(In listbox all the faculties name are displayed from the DB) Suresh Ramesh Vimal Rajesh Then i have one button Generate Chart. when i clcik the Generate Chart Button the data to be displayed in chart. Good Excellent Fair Poor Suresh Ramesh Vimal Rajeshfor that how can i show using graphical chart.Please help me.regards,Narasiman P.推荐答案使用Asp Chart控件并分别添加列名,如下所示 然后绑定你的图表。在代码后面就像你绑定其他控件一样。Use the Asp Chart control and add the column name respectively as shown belowThen Bind ur chart. in code behind like u bind for other controls.<div class="divChart"> <asp:chart id="Chart1" runat="server" palette="SemiTransparent" xmlns:asp="#unknown"> BackImageAlignment="Center" BackImageTransparentColor="Transparent"> <series> <asp:series name="GraphicalChart" xvaluemember="FacultyName" isvalueshownaslabel="true"> YValueMembers="Rating"> </asp:series> </series> <Titles> <asp:title text="Your Rating Name"> </asp:title> </Titles> <legends> <asp:legend name="Rating Scale" title="Rating Scale" alignment="Near" backcolor="Azure"> </asp:legend> </legends> <chartareas> <asp:chartarea name="ChartArea1"> <axisx title="faculty Name"> <majorgrid enabled="false" /> </axisx> <axisy title="Rating"> <majorgrid enabled="false" /> </axisy> </asp:chartarea> </chartareas> </asp:chart> </div> 这篇关于如何使用图表显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-31 08:22