asp.net中调用Office来制作3D统计图

2004-09-16 10:21 出处:CSDN 作者:derny 责任编辑:linjixiong

  1、首先下载owc11 COM组件

  [点击下载]

  2、注册owc11

  在工程中添加 C:\Program Files\Common Files\Microsoft Shared\Web Components\11  文件下的owc11.dll引用

  3、在工程中添加

  using OWC11;

  4、开始coding  举例如下:


  public class ChartFactory
  {
  public ChartFactory()
  {
  InitTypeMap();
  //
  // TODO: 在此处添加构造函数逻辑
  //
  }
  protected System.Web.UI.WebControls.Image imgHondaLineup;
  private string[] chartCategoriesArr;
  private string[] chartValuesArr;
  private OWC11.ChartChartTypeEnum chartType =  OWC11.ChartChartTypeEnum.chChartTypeColumn3D;//默认值
  private static Hashtable chartMap = new Hashtable();
  private static string chartTypeCh = "垂直柱状图" ;
  private static string chartTitle = "";

  private void InitTypeMap()
  {
  chartMap.Clear();
  OWC11.ChartChartTypeEnum[] chartTypes = new OWC11.ChartChartTypeEnum[]{ ChartChartTypeEnum.chChartTypeColumnClustered,
  ChartChartTypeEnum.chChartTypeColumn3D,
  ChartChartTypeEnum.chChartTypeBarClustered,
  ChartChartTypeEnum.chChartTypeBar3D,
  ChartChartTypeEnum.chChartTypeArea,
  ChartChartTypeEnum.chChartTypeArea3D,
  ChartChartTypeEnum.chChartTypeDoughnut,
  ChartChartTypeEnum.chChartTypeLineStacked,
  ChartChartTypeEnum.chChartTypeLine3D,
  ChartChartTypeEnum.chChartTypeLineMarkers,
  ChartChartTypeEnum.chChartTypePie,
  ChartChartTypeEnum.chChartTypePie3D,

 

键盘也能翻页,试试“← →”键
302 Found

302 Found

The requested resource resides temporarily under a different URI.


Powered by Tengine

相关文章

相关软件: