在asp.net里一般用什么做分析的图(如:曲线图,饼图,柱状图),开发比较块,样式漂亮,对于曲线图最后能实现能显示几条曲线:
如:在一个坐标中显示:采购数量,采购金额,等曲线图项目赶的急马上要出东西来,没有时间研究,打家最后能贴出代码,或发代码到[email protected]最后不要给我发那些需要花钱买的第三方组件的例子,因为我们这个项目没有钱买啊.最想了解的是曲线图,分不够我可以补上.

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95在ASP.NET中使用Office Web Components (OWC)创建统计图
      

  2.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95在ASP.NET中使用Office Web Components (OWC)创建统计图柱状图我已经搞定了,现在想要曲线图,和饼图的代码啊.对于曲线图最后能实现能显示几条曲线:
    如:在一个坐标中显示:采购数量,采购金额,等曲线图
      

  3.   

    Office中的OWC11
    -----------------------
    我也打算用OWC11但大家发写例子啊
      

  4.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95
    这里有原代码
      

  5.   

    OWC应该也很简单的,只要传一组数据就行了。
      

  6.   

    自己写比较方便,也快捷;以后维护也容易,一般我开发这样的模块平均0.5天。
    需要的话,我给你发一个。好啊,你给我发个例子看看,[email protected]
      

  7.   

    以前自己用delphi里写了一个组件,然后放到.net里,感觉挺好用
      

  8.   

    我用DundasWebChart
    Dim material_select = DropDownList1.SelectedValue
            Dim series As New Series("line")
            'series.ChartType = "spline"
            series.BorderWidth = 4
            Dim this_month, this_day, i, j
            i = Split(System.DateTime.Today, "-")
            Dim the_month = i(0) & "年" & i(1) & "月"
            If Len(i(1)) = 1 Then
                i(1) = "0" & i(1)
            End If
            If Len(i(2)) = 1 Then
                i(2) = "0" & i(2)
            End If
            'this_day = i(0) & i(1) & i(2)
            this_day = System.DateTime.Today.ToString("yyyyMMdd")
            this_month = i(0) & i(1)
            Dim month_first = i(0) & i(1) & "01"
            sql = "select * from VIEW_PSD_JOIN_COUNT where samp_id >='" & month_first & "' and  samp_id <='" & this_day & "' and stat_name = '" & material_select & "' order by samp_id"
            da = New OracleDataAdapter(sql, cn)
            Dim ds_material As DataSet = New DataSet
            Try
                da.Fill(ds_material, "material")
            Catch ex As Exception
                Response.Write("<script>alert('" + ex.message + "')</script>")
                Return
            End Try
            cn.Close()
            da.Dispose()        Dim tabel1 As DataTable = ds_material.Tables("material")
            Dim x As Integer = ds_material.Tables("material").Rows.Count        Dim c As New DataColumn("prodece_plan")
            c.DataType = System.Type.GetType("System.Decimal")
            c.Caption = "prodece_plan"
            tabel1.Columns.Add(c)        Dim d As New DataColumn("sale_plan")
            d.DataType = System.Type.GetType("System.Decimal")
            d.Caption = "sale_plan"
            tabel1.Columns.Add(d)        Dim produce_left As New DataColumn("produce_left")
            produce_left.DataType = System.Type.GetType("System.Decimal")
            produce_left.Caption = "sale_plan"
            tabel1.Columns.Add(produce_left)        Dim y
            For y = 0 To x - 1
                Dim day_count = CInt(Right(tabel1.Rows(y)("samp_id"), 2))
                tabel1.Rows(y).Item("prodece_plan") = Int(tabel1.Rows(y)("plan_produce") * day_count / month_day())
                tabel1.Rows(y).Item("sale_plan") = Int(tabel1.Rows(y)("prodece_plan") * day_count / month_day())
                'Dim the_samp_id = CDate(tabel1.Rows(y)("samp_id"))
                Dim the_year = Left(tabel1.Rows(y)("samp_id"), 4)
                Dim cur_month = CInt(Mid(tabel1.Rows(y)("samp_id"), 5, 2))
                Dim samp_day = CDate(the_year & "-" & cur_month & "-" & day_count)
                'Dim the_samp_id = CDate(samp_day)
                Dim next_month_first
                If cur_month = 12 Then
                    next_month_first = CDate((the_year + 1) & "-1-1")
                Else
                    next_month_first = CDate(the_year & "-" & (cur_month + 1) & "-1")
                End If
                Dim month_lef = Math.Round(DateDiff(DateInterval.Day, samp_day, next_month_first) - 5 / 3, 3)
                If tabel1.Rows(y)("plan_produce") > tabel1.Rows(y)("mount_produce") Then
                    tabel1.Rows(y)("produce_left") = Math.Round((tabel1.Rows(y)("plan_produce") - tabel1.Rows(y)("mount_produce")) / month_lef, 0)
                End If
            Next        Dim dv As DataView = New DataView
            'Chart1.Titles.Insert(0, "公司" & the_month & material_select & "生产情况走势")
            dv = tabel1.DefaultView
            Dim sername As String = the_month & material_select & "的" & Dropdownlist2.SelectedValue
            If Chart1.Series.GetIndex(sername) > 0 Then
                Label3.ForeColor = Color.Red
                Label3.Text = "指定的项目已经存在"
                Return
            End If        If Chart1.Series.Count > 3 Then
                Label3.ForeColor = Color.Red
                Label3.Text = "项目太多,请清除不需要的项目"
                Return
            End If
            Try
                Dim ser As Series = Chart1.Series.Add(sername)
                ser.Color = sercolors(Chart1.Series.Count - 1)
                ser.LegendText = the_month & material_select & "的" & Dropdownlist2.SelectedValue
                ser.ChartArea = Chart1.ChartAreas(0).Name
                ser.ChartType = "spline"
                ser.XValueType = ChartValueTypes.Date
                ser.ShowLabelAsValue = cbDigit.Checked
                'ser.Name = sername.ToString
                If Dropdownlist2.SelectedValue = "当日产量" Then
                    ser.Points.DataBindXY(dv, "samp_id", dv, "today_produce")
                    ser.FontColor = Color.Red
                ElseIf Dropdownlist2.SelectedValue = "剩余日均" Then
                    ser.Points.DataBindXY(dv, "samp_id", dv, "produce_left")
                    ser.FontColor = Color.Blue
                ElseIf Dropdownlist2.SelectedValue = "当日月累" Then
                    ser.Points.DataBindXY(dv, "samp_id", dv, "mount_produce")
                    'Chart1.Series.YAxisType = AxisType.Secondary
                    ser.YAxisType = AxisType.Secondary
                    ser.FontColor = Color.Black
                ElseIf Dropdownlist2.SelectedValue = "计划进度" Then
                    ser.Points.DataBindXY(dv, "samp_id", dv, "prodece_plan")
                    ser.FontColor = Color.Chocolate
                    ser.YAxisType = AxisType.Secondary
                End If
                ser.ValueMemberX = "samp_id"
                'Label3.ForeColor = Color.Blue
                Label3.Text = ""
            Catch ex As Exception
                Label3.ForeColor = Color.Red
                Label3.Text = ex.Message
            End Try
      

  9.   

    自己用GDI+做曲线图比较麻烦
    微软本身就给我们提供了很好用的组件OWC(噢~~WC!;)http://dotnet.aspx.cc/ShowDetail.aspx?id=ADB6D011-A4AD-43A0-A8BF-3CED872A7A95在ASP.NET中使用Office Web Components (OWC)创建统计图
      

  10.   

    http://www.cnblogs.com/jmtek/archive/2006/02/23/336073.html
    看了上面哪个统计图,你就会后悔用了其他的统计图
      

  11.   

    有一套控件叫Infragistics NetAdvantage 2005 Vol 1 ASP NET Final,这个比较好用,可以设计自己的样式,我这里有
      

  12.   

    http://www.txsec.com/system/gbg.asp?display=1
      

  13.   

    给我发一份,[email protected]
    谢谢!
      

  14.   

    http://www.codeproject.com/aspnet/owc11article.asp
      

  15.   

    #region 创建线状图片
    public void BuildLineWebChart(string pTitle,string pXValue,string pYValue,int pWidth,int pHeight,string[] arrValues,string[] arrValueNames,string pSavePath)
    {
    //创建ChartSpace对象来放置图表
    OWC.ChartSpace objCSpace = new OWC.ChartSpaceClass ();  //在ChartSpace对象中添加图表,Add方法返回chart对象
    OWC.WCChart objChart = objCSpace.Charts.Add (0);  //指定图表的类型。类型由OWC.ChartChartTypeEnum枚举值得到
    objChart.Type = OWC.ChartChartTypeEnum.chChartTypeLine; //指定图表是否需要图例
    objChart.HasLegend = true; //给定标题
    objChart.HasTitle = true;
    objChart.Title.Caption= pTitle;
    //objChart.Title.Font.Bold=;
    objChart.Title.Font.Color = "blue";
    objChart.Title.Font.Italic = false;
    objChart.Title.Font.Name = "隶书";
    objChart.Title.Font.Size = 18;
    objChart.Title.Font.Underline = c.owcUnderlineStyleSingle; //给定x,y轴的图示说明
    objChart.Axes[0].HasTitle = true;
    objChart.Axes[0].Title.Caption = pYValue;
    objChart.Axes[1].HasTitle = true;
    objChart.Axes[1].Title.Caption = pXValue;
    string sCategory="";
    string sValue="";
    string sSeries="";
    for (int i = 0; i < arrValueNames.Length; i++) 

    sSeries += arrValues[i].ToString();
    sCategory += arrValueNames[i].ToString()+'\t';
    sValue += arrValues[i].ToString()+'\t';
    }
    //添加一个series
    objChart.SeriesCollection.Add(0);
    //给定series的名字
    objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimSeriesNames,
    + (int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sSeries);
    //给定分类
    objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimCategories,
    + (int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sCategory);
    //给定值
    objChart.SeriesCollection[0].SetData (OWC.ChartDimensionsEnum.chDimValues,
    (int)OWC.ChartSpecialDataSourcesEnum.chDataLiteral, sValue); 

    //输出成GIF文件.
    objCSpace.ExportPicture(pSavePath, "GIF", pWidth, pHeight);
    }
    #endregion我用OWC写曲线图是 objChart.Title.Font.Color = "blue";
    objChart.Title.Font.Italic = false;
    objChart.Title.Font.Name = "隶书";
    objChart.Title.Font.Size = 18;
    objChart.Title.Font.Underline = c.owcUnderlineStyleSingle;这样设置title字体怎么不行啊,应该怎么设置,
    还有我想在一个座标系中显示4条曲线图怎么实现(采购数量,采购金额,等)
      

  16.   

    直接画出来,.net提供的画图功能很强大的
      

  17.   

    曲线图我是用GDI来做,画N条曲线都没问题,不过就是处理起有点麻烦,要把数据库的数据整来搞去了,有点慢,不过自己习惯了!
    发了个以前写的给你,代码很乱,当时是为了赶时间!思路挺简单的,就是通过SQL语句把数据提出来,通过一些加减的办法得到X、Y轴的具体坐标!
    [email protected] 发的这个邮箱!
      

  18.   

    dotnetchart ~~~~it is good open source component~~
      

  19.   

    曲线图我是用GDI来做,画N条曲线都没问题,不过就是处理起有点麻烦,要把数据库的数据整来搞去了,有点慢,不过自己习惯了!
    发了个以前写的给你,代码很乱,当时是为了赶时间!思路挺简单的,就是通过SQL语句把数据提出来,通过一些加减的办法得到X、Y轴的具体坐标!
    [email protected] 发的这个邮箱!
    --------------------------------------------------------------------------------
    代码已经收到,感谢中......
    等下我看看代码能不能用在我现在的项目中
      

  20.   

    http://www.cnblogs.com/jmtek/archive/2006/02/23/336073.html好用
      

  21.   

    Component One WebChart:
    http://blog.csdn.net/ChengKing/category/146827.aspx