忒简单了阿==================================================================
博客空间:http://blog.csdn.net/lovingkiss
资源下载:http://download.csdn.net/user/lovingkiss
优惠接单开发,组件控件定制开发,成品源代码批发
联系方式:Q64180940 全天在线
==================================================================

解决方案 »

  1.   

    怎么我联系了,人去哪里了??==================================================================
    博客空间:http://blog.csdn.net/lovingkiss
    资源下载:http://download.csdn.net/user/lovingkiss
    优惠接单开发,组件控件定制开发,成品源代码批发
    联系方式:Q64180940 全天在线
    ==================================================================
      

  2.   

    目前实现的主要数据统计分析功能如下: 1、  对小指标日值数据进行任意时段任意单点或多点的曲线趋势分析 2、  支持不同坐标系缩放,既多坐标系统,使数据值相差很大的数据点能在同一画面友好显示 3、  支持显示点数据导出与曲线趋势图(图片形式)直接保存  曲线实现核心代码,以前也用vml整理过 
    private void view_duns()//by wyw308将右边listbox的项目显示成曲线 
      { 
       Chart1.Series.Clear(); 
       Chart1.Legends["Default"].Docking=LegendDocking.Bottom; 
       Chart1.ChartAreas["Default"].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount; //by wyw308网格粗细 
       int m_count=lst_view.Items.Count; 
    //   foreach(ListItem itmsel in lst_view.Items)//by wyw308循环组件的方式,不好 
       for(int i=0;i <m_count;i++) 
       { 
    //     add_ser(Chart1,itmsel.Value,itmsel.Text); 
        add_ser(Chart1,lst_view.Items[i].Value,lst_view.Items[i].Text);//by wyw308添加serries 
        if(ckb_v.Checked)//by wyw308是否多y轴显示 
        { 
         // Set custom chart area position 
         Chart1.ChartAreas["Default"].Position = new ElementPosition(20,10,68,82); 
         Chart1.ChartAreas["Default"].InnerPlotPosition = new ElementPosition(5,0,90,75); 
         // Create extra Y axis for second and third series 
         //     CreateYAxis(Chart1, Chart1.ChartAreas["Default"], Chart1.Series[name], 7+i*5, 8); 
         if(i>0) 
          CreateYAxis(Chart1, Chart1.ChartAreas["Default"],Chart1.Series[lst_view.Items[i].Text],8+(20-8)*i/m_count,9); //by wyw308动态显示Y轴位置 
        } 
       } 
      } 
      private void add_ser(Dundas.Charting.WebControl.Chart ds_chart,string code,string name)//by wyw308添加曲线的series 
      { 
       string dt_1=dtp_s.Value.ToString("yyyy-MM-dd").Replace("-",""); 
       string dt_2=dtp_e.Value.ToString("yyyy-MM-dd").Replace("-",""); 
       string sql="Select "+ 
        " t1.NAME 指标名称,t1.UNIT 单位,t1.CODE 指标代码,"+ 
        " t2.NOW_VALUE 日值,"+ 
    //    " to_char(t2.INCEPT_DATE,'mm-dd') 接收日期"+ 
        " to_char(t2.INCEPT_DATE,'mm-dd') 接收日期"+ 
        " From sts_dtarget t1,sts_dayvalues t2"+ 
        " Where to_char(t2.INCEPT_DATE,'yyyymmdd')>='"+dt_1+"' And to_char(t2.INCEPT_DATE,'yyyymmdd') <='"+dt_2+"'And t2.CODE='"+code+"' And t1.code=t2.code order by t2.INCEPT_DATE"; 
       MyOraComm.ConnForOracle cfo=new MyOraComm.ConnForOracle("dbf_connstr"); 
       DataSet ds=cfo.ReturnDataSet(sql,"ser"); 
       ds_chart.Series.Add(name); 
       ds_chart.Series[name].Type = SeriesChartType.Line; 
       for(int i=0;i <ds.Tables[0].Rows.Count;i++) 
       { 
        ds_chart.Series[name].Points.AddXY(ds.Tables[0].Rows[i]["接收日期"],ds.Tables[0].Rows[i]["日值"]); 
    //    ds_chart.Series[name].Points.AddXY(DateTime.Parse(ds.Tables[0].Rows[i]["接收日期"].ToString()),ds.Tables[0].Rows[i]["日值"]); 
    //    ds_chart.Series[name].Points.AddY(ds.Tables[0].Rows[i]["日值"]); 
        ds_chart.Series[name].ToolTip = "#SERIESNAME\nX:#AXISLABEL\nY:#VALY";//by wyw308显示提示信息 
    //    ds_chart.ChartAreas["Default"].AxisX.LabelStyle.Format = "ddd";//by wyw308格式化数据,没效果 
    //    ds_chart.ChartAreas["Default"].AxisX.LabelStyle.ShowEndLabels = false;      
       } 
       cfo.CloseConn(); 
      } 本文链接地址:http://www.net235.com/post/95.html 复制链接  | 加入收藏 
    转载请注明:转载自网络235 学无止境 [ http://www.net235.com/ ]