Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the code of calling Office in asp.net to make 3D statistical chart

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to write ASP.NET call Office to make 3D statistical chart code", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "how to write ASP.NET call Office to make 3D statistical chart code"!

1. Download owc11 COM components first

http://www.microsoft.com/downloads/details.aspx? FamilyID=7287252c-402e-4f72-97a5-e0fd290d4b76&displaylang=en

2. Registration owc11

Add owc11.dll reference under C:/Program Files/Common Files/Microsoft Shared/Web Components/11 file to project

3. Add in the project

using OWC11;

4. Examples of starting coding are as follows:

The copy code is as follows:

public class ChartFactory

{

public ChartFactory()

{

InitTypeMap();

//

// TODO: Add constructor logic here

//

}

protected System.Web.UI.WebControls.Image imgHondaLineup;

private string[] chartCategoriesArr;

private string[] chartValuesArr;

private OWC11.ChartChartTypeEnum chartType = OWC11.ChartTypeEnum.chChartTypeColumn3D;//Default

private static Hashtable chartMap = new Hashtable();

private static string chartTypeCh = "Vertical histogram" ;

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,

ChartChartTypeEnum.chChartTypeRadarSmoothLine,

ChartChartTypeEnum.chChartTypeSmoothLine};

string[] chartTypesCh = new string [] {"Vertical Bar Chart,""3D Vertical Bar Chart,""Horizontal Bar Chart,""3D Horizontal Bar Chart,""Area Chart,""3D Area Chart,""Hollow Pie Chart,""Line Chart,""3D Line Chart,""Line Chart with Points,""Pie Chart,""3D Pie Chart,""Network Chart,""Arc Chart"};

for(int i=0;i

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report