请问各位有做过用vs2003调用owc生成统计图形的,数据是从数据库中读取,上面显示统计图,下面显示datagrid数据。
最好给代码例子,谢谢!!!

解决方案 »

  1.   

    用webchart控件,出来就能显示图表了。
      

  2.   

    to vs2003与调用owc控件生成各种曲线 winformowc是office web component的缩写,因此不适合在winform中使用。
      

  3.   

    是用Microsoft Office  Chart 11.0
    谢谢!!
      

  4.   

    Simple Charts Using OWC (Office Web Component)
    http://www.codeproject.com/csharp/ChartOWC.asp
      

  5.   

    axChartSpace2.ChartLayout = OWC11.ChartChartLayoutEnum.chChartLayoutHorizontal;
    chchart = axChartSpace2.Charts.Add (0); 
    chchart.HasTitle = true;
    chchart.Title.Caption= "My Chart";
    chchart.Type = OWC11.ChartChartTypeEnum.chChartTypeLine;
    chchart.Axes[0].HasTitle = true;
    chchart.Axes[0].Title.Caption = "X - Axis";
    chchart.Axes[0].Scaling.Maximum = 10;
    chchart.Axes[0].Scaling.Minimum = 0;
    chchart.Axes[1].HasTitle = true;
    chchart.Axes[1].Title.Caption = "Y - Axis";
    chchart.Axes [1].Scaling .Maximum = 10;
    chchart.Axes [1].Scaling .Minimum = 0;
    string strSeriesName = "My Series";
    string strCategory = "1,2,3,4,5";
    string strValue = "3,8,2,8,4";
    //Add a series to the chart抯 series collection
    ChSeries series = chchart.SeriesCollection.Add(0);
    //Give the name of the series
    chchart.SeriesCollection[0].SetData (OWC11.ChartDimensionsEnum.chDimSeriesNames, (int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, strSeriesName);
    //Give the Categories
    chchart.SeriesCollection[0].SetData (OWC11.ChartDimensionsEnum.chDimCategories, (int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, strCategory);
    //Give The values
    chchart.SeriesCollection[0].SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, strValue); 
    series.Line.set_Weight(OWC11.LineWeightEnum.owcLineWeightHairline  );
    series.Marker.Style = ChartMarkerStyleEnum.chMarkerStyleNone;怎么使用Dataset 或 DataGrid中的数据