⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trendlinepower.aspx

📁 掌握学习.net开发的非常好的资料
💻 ASPX
字号:
	<%@ Page Language="C#" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="dotnetCHARTING"%>
<HTML>
	<HEAD>
		<TITLE>.netCHARTING Forecast Sample</TITLE>
		<script runat="server">

void Page_Load(Object sender,EventArgs e)
{
     
	// This sample demonstrates the use of TrendLinePower from  within Forecasting 	
	// which find the best fitting power curve to sets of data
	// The Forecast Chart
	ForecastChart.Title="Forecast Power";
	ForecastChart.TempDirectory="temp";
	ForecastChart.Debug=true;
	ForecastChart.Size = "1000x400";
	ForecastChart.LegendBox.Template ="%icon %name";
	ForecastChart.XAxis.Scale = Scale.Normal;
		
	SeriesCollection spower = new SeriesCollection();
	Series sampledata1 = new Series ("Sample 1");
	for ( int i = 1; i < 10; i++) {
		Element el = new Element();
		el.YValue = 2*Math.Pow(i, 3) ;
		el.XValue = i ;
		sampledata1.Elements.Add (el);
	}

	spower.Add (sampledata1);
	spower[0].Type = SeriesType.Marker;

	ForecastChart.SeriesCollection.Add (spower);
	
	// Here we create a series which will hold the Y values calculated with the  PowerFit indicator
	Series trendLinePower = new Series();
	trendLinePower = ForecastEngine.TrendLinePower(sampledata1);
	
	//The next two lines display no to the chart the power function used
	// to fit the curve
	trendLinePower.Elements[0].SmartLabel.Text = "Function: %Function";
	trendLinePower.Elements[0].ShowValue =  true;
	trendLinePower.DefaultElement.Marker = new ElementMarker (ElementMarkerType.None);
	
	trendLinePower.DefaultElement.Color = Color.FromArgb(255,99,49);
	trendLinePower.Type = SeriesType.Spline;
	ForecastChart.SeriesCollection.Add(trendLinePower);

}

		</script>
	</HEAD>
	<BODY>
		<DIV align="center">
			
			<dotnet:Chart id="ForecastChart" runat="server"/>
			</dotnet:Chart>
			
		</DIV>
	</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -