📄 trendlinelogarithmic.aspx
字号:
<%@ Page Language="VB" 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 Logarithm Sample</TITLE>
<script runat="server">
Sub Page_Load(sender As [Object], e As EventArgs)
' This sample demonstrates the use of TrendLineLogarithmic from within Forecasting
'which find the best fitting logarithmical curve to sets of data
' The Forecast Chart
ForecastChart.Title = "Forecast Logarithm"
ForecastChart.TempDirectory = "temp"
ForecastChart.Debug = True
ForecastChart.Size = "1000x400"
ForecastChart.LegendBox.Template = "%icon %name"
ForecastChart.XAxis.Scale = Scale.Normal
Dim slogarithm As New SeriesCollection()
Dim sampledata1 As New Series("Sample 1")
Dim i As Integer
For i = 1 To 9
Dim el As New Element()
el.YValue = Math.Log(i) * i + 2
el.XValue = i
sampledata1.Elements.Add(el)
Next i
slogarithm.Add(sampledata1)
slogarithm(0).Type = SeriesType.Marker
ForecastChart.SeriesCollection.Add(slogarithm)
' Here we create a series which will hold the Y values calculated with the LogarithmFit indicator
Dim trendLineLogarithmic As New Series()
trendLineLogarithmic = ForecastEngine.TrendLineLogarithmic(sampledata1)
'The next two lines display on to the chart the logarithmic function used
' to fit the curve
trendLineLogarithmic.Elements(0).SmartLabel.Text = "Function: %Function"
trendLineLogarithmic.Elements(0).ShowValue = True
trendLineLogarithmic.DefaultElement.Color = Color.FromArgb(255, 99, 49)
trendLineLogarithmic.Type = SeriesType.Spline
ForecastChart.SeriesCollection.Add(trendLineLogarithmic)
End Sub 'Page_Load
</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 + -