VS2010中 chart图表显示为红叉,急急急!!!

callcenter油条 2011-11-23 03:07:23
最近在研究chart,在VS2010,4.0,将微软提供的示例在工程中执行,显示的是红叉,为什么???

在工程的根目录下可以显示,在子目录下显示红叉,是哪里配置问题?


<form id="Forms1" method="post" runat="server">
<p class="dscr">This sample demonstrates how to use the Chart control without
code-behind pages.</p>
<table class="sampleTable">
<tr>
<td class="tdchart">

<%
System.Web.UI.DataVisualization.Charting.Chart Chart1 = new System.Web.UI.DataVisualization.Charting.Chart();
Chart1.Width = 412;
Chart1.Height = 296;
Chart1.RenderType = RenderType.ImageTag;
Chart1.ImageLocation = "..\\TempImages\\ChartPic_#SEQ(200,30)";

Chart1.Palette = ChartColorPalette.BrightPastel;
Title t = new Title("No Code Behind Page", Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), System.Drawing.Color.FromArgb(26, 59, 105));
Chart1.Titles.Add(t);
Chart1.ChartAreas.Add("Series 1");
// create a couple of series
Chart1.Series.Add("Series 1");
Chart1.Series.Add("Series 2");


// add points to series 1
Chart1.Series["Series 1"].Points.AddY(5);
Chart1.Series["Series 1"].Points.AddY(8);
Chart1.Series["Series 1"].Points.AddY(12);
Chart1.Series["Series 1"].Points.AddY(6);
Chart1.Series["Series 1"].Points.AddY(9);
Chart1.Series["Series 1"].Points.AddY(4);

// add points to series 2
Chart1.Series["Series 2"].Points.AddY(2);
Chart1.Series["Series 2"].Points.AddY(6);
Chart1.Series["Series 2"].Points.AddY(18);
Chart1.Series["Series 2"].Points.AddY(16);
Chart1.Series["Series 2"].Points.AddY(21);
Chart1.Series["Series 2"].Points.AddY(14);

Chart1.BorderSkin.SkinStyle = BorderSkinStyle.Emboss;
Chart1.BorderColor = System.Drawing.Color.FromArgb(26, 59, 105);
Chart1.BorderlineDashStyle = ChartDashStyle.Solid;
Chart1.BorderWidth = 2;

Chart1.Legends.Add("Legend1");

// show legend based on check box value
Chart1.Legends["Legend1"].Enabled = ShowLegend.Checked;

// Render chart control
Chart1.Page = this;
HtmlTextWriter writer = new HtmlTextWriter(Page.Response.Output);
Chart1.RenderControl(writer);

%>
</td>
<td valign="top">
<table class="controls" cellpadding="4">
<tr>
<td class="label48"></td>
<td>
<p><asp:checkbox id="ShowLegend" runat="server" Text="Show Legend" AutoPostBack="True"></asp:checkbox></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p class="dscr">It is recommended that you use code-behind for your ASP.NET pages
when using the Chart control. This separates the user interface and its logic.</p>
<p>
</p>
<p> </p>
<table id="Table1" cellspacing="7" cellpadding="1" border="0">
<tr>
<td valign="top" align="left" width="360">
</td>
<td valign="top" align="left">
<p> </p>
</td>
</tr>
</table>
</form>
...全文
833 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
vcong 2013-06-24
  • 打赏
  • 举报
回复
怎么解决的?
callcenter油条 2012-02-21
  • 打赏
  • 举报
回复
已经解决了,分数全给supper168吧,以示支持!
callcenter油条 2011-11-28
  • 打赏
  • 举报
回复
修改这里了还是不行哦
涉及配置的地方我都修改尝试了,还是不行
ding gai?
春天的气息 2011-11-24
  • 打赏
  • 举报
回复
"..\\TempImages\\ChartPic_#SEQ(200,30)";

修改一下这里,在根目录里,这里向上线目录也仍是根目录,在子目录后,向一级就到其他目录了。

4,820

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧