Trendlines.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new trendline. Returns a Trendline object.
public Microsoft.Office.Interop.Excel.Trendline Add (Microsoft.Office.Interop.Excel.XlTrendlineType Type = Microsoft.Office.Interop.Excel.XlTrendlineType.xlLinear, object Order, object Period, object Forward, object Backward, object Intercept, object DisplayEquation, object DisplayRSquared, object Name);
Public Function Add (Optional Type As XlTrendlineType = Microsoft.Office.Interop.Excel.XlTrendlineType.xlLinear, Optional Order As Object, Optional Period As Object, Optional Forward As Object, Optional Backward As Object, Optional Intercept As Object, Optional DisplayEquation As Object, Optional DisplayRSquared As Object, Optional Name As Object) As Trendline
Parameters
- Type
- XlTrendlineType
Optional XlTrendlineType. The trendline type.
- Order
- Object
Optional Object. Required if Type
is xlPolynomial. The trendline order. Must be an integer from 2 to 6, inclusive.
- Period
- Object
Optional Object. Required if Type
is xlMovingAvg. The trendline period. Must be an integer greater than 1 and less than the number of data points in the series you're adding a trendline to.
- Forward
- Object
Optional Object. The number of periods (or units on a scatter chart) that the trendline extends forward.
- Backward
- Object
Optional Object. The number of periods (or units on a scatter chart) that the trendline extends backward.
- Intercept
- Object
Optional Object. The trendline intercept. If this argument is omitted, the intercept is automatically set by the regression.
- DisplayEquation
- Object
Optional Object. True to display the equation of the trendline on the chart (in the same data label as the R-squared value). The default value is False.
- DisplayRSquared
- Object
Optional Object. True to display the R-squared value of the trendline on the chart (in the same data label as the equation). The default value is False.
- Name
- Object
Optional Object. The name of the trendline as text. If this argument is omitted, Microsoft Excel generates a name.
Returns
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기