【柱状图问题】请教看看这个图 这个 是回答 A B C D 得到的一个 柱状图。 请问 怎么绑定。 用 水晶报表 还是怎么做。 希望代码有注释。 学习中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 下载第三方也可以实现 去搜一下.net 柱状图 你可以先看下chart的相关资料 ,应该能实现你要的,具体有什么不清楚的,在找大家帮忙看看吧 这个VS2010的Chart控件完全可以搞定。 我在考虑用 <asp:TextBox ID="TetPrice" runat="server" BackColor="#CC6699" Width="30px"></asp:TextBox> 的高 1,MS Chart 可能用frame4.0效果好一点。 2, office 组件 owc11.exe 3, open flash chart 免费的 visifire open flash chart 这个有没有好的例子。 我觉得 flash的效果 好像不错。感觉动态感强 用FusionCharts 把.免费又好用.动态绑定数据.支持sql.数组.xml等.带缓冲效果.容易设置网上有标准源码实例. 这个选择余地很多,水晶报表可以,第三方控件也可以,flex也可以,jquery也可以。这个资料很多可以搜索,我也实现了部分,可以联系我。 MSChart 可以 比较容易的实现 <asp:Chart id="chartBar" runat="server" ImageType="Png" Palette="BrightPastel" BackColor="#D3DFF0" Height="296px" Width="412px" BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105" IsSoftShadows="False" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)"> <legends> <asp:Legend LegendStyle="Row" IsTextAutoFit="False" Docking="Bottom" Name="Red" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" Alignment="Far"> </asp:Legend> </legends> <Series> <asp:Series Name="SeriesSafe" LegendText="安全性" BorderColor="Red" Color="Red"> </asp:Series> <asp:Series Name="SeriesAdvantage" LegendText="收益率" BorderColor="Orange" Color="Orange" > </asp:Series> <asp:Series Name="SeriesHonor" LegendText="发行人口碑" BorderColor="Blue" Color="Blue"> </asp:Series> </Series> <borderskin skinstyle="Emboss"></borderskin> <ChartAreas> <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BackGradientStyle="TopBottom"> <axisy2> <MajorGrid Enabled="False" /> <MajorTickMark Enabled="False" /> </axisy2> <axisx2> <MajorGrid Enabled="False" /> <MajorTickMark Enabled="False" /> </axisx2> <area3dstyle PointGapDepth="900" Rotation="162" IsRightAngleAxes="False" WallWidth="25" IsClustered="False" /> <axisy LineColor="64, 64, 64, 64"> <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" /> <MajorGrid LineColor="64, 64, 64, 64" Enabled="False" /> <MajorTickMark Enabled="False" /> </axisy> <axisx LineColor="64, 64, 64, 64"> <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" /> <MajorGrid LineColor="64, 64, 64, 64" Enabled="False" /> <MajorTickMark Enabled="False" /> </axisx> </asp:ChartArea> </ChartAreas> </asp:Chart> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetLine(); } } #region 获取产品柱状图 /// <summary> /// 获取柱状图 /// </summary> private void GetLine() { string[] sFile = { "NewsTitle,Safe,Advantage,Honor" }; string newTable = "News_Product"; string firstWhere = " NewsID = 13 "; //获取数据源 DataTable dt = PublicMethod.ReturnNewFirstTable(sFile, newTable, firstWhere); if (dt != null) { chartBar.Series["SeriesSafe"].Points.DataBind(dt.DefaultView, "NewsTitle", "Safe", "Label=Safe,ToolTip=Safe"); chartBar.Series["SeriesAdvantage"].Points.DataBind(dt.DefaultView, "NewsTitle", "Advantage", "Label=Advantage,ToolTip=Advantage"); chartBar.Series["SeriesHonor"].Points.DataBind(dt.DefaultView, "NewsTitle", "Honor", "Label=Honor,ToolTip=Honor"); } } #endregion http://download.csdn.net/source/2660063 你可以用 FusionCharts !没必要就必须用.NET 水晶报表 有关于GridView_RowCommand事件中的获值问题 textbox控件的AUTOPOSTBACK属性 求大虾帮忙修改下代码,急急急~~~~~ FCKEditor怎样插入视频文件,比如mpg,avi格式等等? asp.net创建内置数据库的问题 imageButton有onmouseover属性吗?怎样才能实现? 绘图问题? 不知道大家遇到过这样的问题没有! 日期比较的SQL语句怎么写 一个关于数据转移的问题,分不是问题. .net中的缓存,总是提示我未将对象引用到实例 正则表达式
2, office 组件 owc11.exe
3, open flash chart 免费的
免费又好用.动态绑定数据.支持sql.数组.xml等.
带缓冲效果.
容易设置
网上有标准源码实例.
<asp:Chart id="chartBar" runat="server" ImageType="Png" Palette="BrightPastel" BackColor="#D3DFF0" Height="296px" Width="412px" BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105" IsSoftShadows="False" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)">
<legends>
<asp:Legend LegendStyle="Row" IsTextAutoFit="False" Docking="Bottom" Name="Red" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" Alignment="Far">
</asp:Legend>
</legends>
<Series>
<asp:Series Name="SeriesSafe" LegendText="安全性" BorderColor="Red" Color="Red">
</asp:Series>
<asp:Series Name="SeriesAdvantage" LegendText="收益率" BorderColor="Orange" Color="Orange" >
</asp:Series>
<asp:Series Name="SeriesHonor" LegendText="发行人口碑" BorderColor="Blue" Color="Blue">
</asp:Series>
</Series>
<borderskin skinstyle="Emboss"></borderskin>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<axisy2>
<MajorGrid Enabled="False" />
<MajorTickMark Enabled="False" />
</axisy2>
<axisx2>
<MajorGrid Enabled="False" />
<MajorTickMark Enabled="False" />
</axisx2>
<area3dstyle PointGapDepth="900" Rotation="162" IsRightAngleAxes="False" WallWidth="25" IsClustered="False" />
<axisy LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" Enabled="False" />
<MajorTickMark Enabled="False" />
</axisy>
<axisx LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" Enabled="False" />
<MajorTickMark Enabled="False" />
</axisx>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetLine();
}
} #region 获取产品柱状图
/// <summary>
/// 获取柱状图
/// </summary>
private void GetLine()
{ string[] sFile = { "NewsTitle,Safe,Advantage,Honor" };
string newTable = "News_Product";
string firstWhere = " NewsID = 13 ";
//获取数据源
DataTable dt = PublicMethod.ReturnNewFirstTable(sFile, newTable, firstWhere);
if (dt != null)
{ chartBar.Series["SeriesSafe"].Points.DataBind(dt.DefaultView, "NewsTitle", "Safe", "Label=Safe,ToolTip=Safe");
chartBar.Series["SeriesAdvantage"].Points.DataBind(dt.DefaultView, "NewsTitle", "Advantage", "Label=Advantage,ToolTip=Advantage");
chartBar.Series["SeriesHonor"].Points.DataBind(dt.DefaultView, "NewsTitle", "Honor", "Label=Honor,ToolTip=Honor");
}
}
#endregion