正在閱讀:asp.net中調(diào)用Office來(lái)制作3D統(tǒng)計(jì)圖asp.net中調(diào)用Office來(lái)制作3D統(tǒng)計(jì)圖

2004-09-16 10:21 出處:CSDN 作者:derny 責(zé)任編輯:linjixiong

  1、首先下載owc11 COM組件

  [點(diǎn)擊下載]

  2、注冊(cè)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: 在此處添加構(gòu)造函數(shù)邏輯
  //
  }
  protected System.Web.UI.WebControls.Image imgHondaLineup;
  private string[] chartCategoriesArr;
  private string[] chartValuesArr;
  private OWC11.ChartChartTypeEnum chartType =  OWC11.ChartChartTypeEnum.chChartTypeColumn3D;//默認(rèn)值
  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,

 

鍵盤也能翻頁(yè),試試“← →”鍵
302 Found

302 Found


Powered by Tengine
tengine