用OFC画多条曲线

    Open flash chart的使用文章已经很多了,这我就不多说了,贴段OFC画多条曲线的代码供大家学习参考,有不尽的地方请谅解,如果有疑问可以给我留言,也可以直接联系我。

OFC代码
 
   
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Collections;
namespace OFCWeb
{
/// < summary >
/// $codebehindclassname$ 的摘要说明
/// </ summary >
[ WebService(Namespace = "http://tempuri.org/") ]
[ WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1) ]
public class Tline : IHttpHandler
{

public void ProcessRequest(HttpContext context)
{
context.Response.ContentType
= " text / plain";
OFC.OFC chart
= new OFC.OFC();
List
< int > avgbid = new List < int > ();
List
< string > avgbid_month = new List < string > ();
IList
< int > list_used = new List < int > ();
OFC.Line line_avgbid
= new OFC.Line();
chart.Bgcolor
= "#FFFFFF";
if (false)
{
// line_avgbid. Text = "没有数据信息";
}
else
{
for ( int i = 20 ; i < 30 ; i ++ )
{
avgbid.
Add (i);
}
for ( int i = 0 ; i < 10 ; i ++ )
{
list_used.
Add (i);
}
line_avgbid.
Values = avgbid;
line_avgbid.
Text = "二手房成交均价";
line_avgbid.DotSize
= 2 ;
line_avgbid.DotStyleType.Tip
= "#val#元 / ㎡";
line_avgbid.Colour
= "#6600cc";
chart.Title
= new OFC.Title("aa");
line_avgbid.DotStyleType.Colour
= "#6600cc";
chart.AddElement(line_avgbid);

OFC.Line line_used
= new OFC.Line();
line_used.
Values = (IList)list_used;
line_used.
Text = "二手房挂牌均价";
line_used.Colour
= "#ff9900";
line_used.DotStyleType.Tip
= "#val#元 / ㎡";
chart.AddElement(line_used);
chart.Y_Legend
= new OFC.Legend("");
chart.Y_Axis.
Max = 40 ;
chart.Y_Axis.
Min = 0 ;
chart.Y_Axis.Steps
= 2 ;
chart.X_Axis.SetLabels(avgbid_month);
chart.X_Axis.Labels.VisibleSteps
= 4 ;
}
context.Response.Clear();
context.Response.CacheControl
= "no - cache";
context.Response.Write(chart.ToPrettyString());
context.Response.
End ();

}

public bool IsReusable
{
get
{
return false;
}
}
}
}

 

转载于:https://www.cnblogs.com/_fyz/archive/2010/11/11/1874688.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值