找回密码
 立即注册

QQ登录

只需一步,快速开始

fmyuan2000

中级会员

26

主题

58

帖子

516

积分

中级会员

积分
516

活字格认证元老葡萄

fmyuan2000
中级会员   /  发表于:2015-10-28 17:38  /   查看:5096  /  回复:5
chart.png

版本号:8.1
浏览器:Chrome 版本 44.0.2403.157 m
FarPoint.Web.Chart
8.40.20151.0

Spread for ASP.NET 8.0 Product Documentation
Using a Bound Data Source
Spread for ASP.NET 8.0 Product Documentation > Developer's Guide > Working with the Chart Control > Creating Charts > Connecting to Data > Using a Bound Data Source

代码如下:
System.Data.DataTable dt = new System.Data.DataTable("Test");
System.Data.DataRow dr = default(System.Data.DataRow);
dt.Columns.Add("Series0");
dt.Columns.Add("Series1");
dr = dt.NewRow();
dr[0] = 2;
dr[1] = 1;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 4;
dr[1] = 2;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 3;
dr[1] = 4;
FarPoint.Web.Chart.BarSeries series = new FarPoint.Web.Chart.BarSeries();
series.Values.DataSource = dt;
series.Values.DataField = dt.Columns[0].ColumnName;
FarPoint.Web.Chart.YPlotArea plotArea = new FarPoint.Web.Chart.YPlotArea();
FarPoint.Web.Chart.ChartModel model = new FarPoint.Web.Chart.ChartModel();
plotArea.Location = new System.Drawing.PointF(0.2F, 0.2F);
plotArea.Size = new System.Drawing.SizeF(0.6F, 0.6F);
plotArea.Series.Add(series);
model.PlotAreas.Add(plotArea);
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart();
chart.Model = model;
FpSpread1.Sheets[0].Charts.Add(chart);

5 个回复

倒序浏览
fmyuan2000
中级会员   /  发表于:2015-10-28 17:44:00
沙发
http://localhost:19435/fp_client/fpspread/8_40_20151_0/htc/SpreadResources.zh-CN.js Failed to load resource: the server responded with a status of 404 (Not Found)

2http://localhost:19435/FpChart.axd?InstanceGuid=be38b540-5ca6-4c84-b9c9-b10404d56f15&it=Jpeg&its=Session&kts=True&rnd=0.581192882536535 Failed to load resource: the server responded with a status of 404 (Not Found)
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-10-28 18:04:00
板凳
回复 2楼fmyuan2000的帖子

在 WebConfig 文件中添加以下信息:
  1. <httpHandlers>

  2.       <add path="FpChart.axd" verb="*" type="FarPoint.Web.Chart.ChartImageHttpHandler" validate="true" />

  3.     </httpHandlers>
复制代码


博客文章:http://blog.gcpowertools.com.cn/ ... A7%A3%E6%9E%90.aspx
回复 使用道具 举报
fmyuan2000
中级会员   /  发表于:2015-10-29 09:36:00
地板
AA.png

使用的是VS2013 update5
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-10-29 11:07:00
5#
回复 4楼fmyuan2000的帖子

从截图看不确定 500 错误是哪一个节点抛出来的。

您可以在WebForm UI 界面上添加一个 FpChart 控件,这样在 WebConfig 中就能自动生成节点来。

评分

参与人数 1满意度 +5 收起 理由
fmyuan2000 + 5 ok.

查看全部评分

回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-11-9 09:34:00
6#
回复 4楼fmyuan2000的帖子

请问问题是否解决?为了给你提供更优质的服务,请对本次服务进行评分。
我们会认真对待你提出的宝贵意见。您可以关注我们的微信服务号(微信号:GrapeCityDT),帖子有回复时可即时收到提醒,便于您第一时间查看,尽快解决技术问题。关注即可获得300金币用于兑换礼品。
谢谢
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部