输入折线图旁边的折线图中的趋势线

Trend line in line chart next to input line chart

我不明白为什么在输入的系列图表旁边画了一个趋势。趋势曲线应通过现有数据(第一个系列)绘制并提前 1 个月延伸。相反,它从输入系列结束的地方开始并继续(见橙色虚线):

我用来创建趋势线的代码如下

' do stuff for series (0) and (1)....
' databind before creating trend curve........
Me.Chart4.DataBind()
' trend ----------------------
Me.Chart4.Series.Add("TrendCurve")
Me.Chart4.Series("TrendCurve").ChartType = DataVisualization.Charting.SeriesChartType.Spline
Me.Chart4.Series("TrendCurve").BorderWidth = 3
Me.Chart4.Series("TrendCurve").BorderDashStyle = DataVisualization.Charting.ChartDashStyle.Dash
Me.Chart4.Series("TrendCurve").IsVisibleInLegend = False
' ************* calculate trend line **************
Me.Chart4.DataManipulator.FinancialFormula(
       DataVisualization.Charting.FinancialFormula.Forecasting,
       "Exponential,1,false,false", 
       Me.Chart4.Series("Performance"), 
       Me.Chart4.Series("TrendCurve"))

此外,趋势 "curve" 显示为直线,尽管我选择了 "exponential" 并且我希望它稍微弯曲...

编辑: 我试图逐点填充第一个数据集而不是数据集(因为示例以这种方式显示),但正如我所料,它没有效果。

我知道它必须是简单的东西,但是......似乎问题的唯一原因是数据没有明确排序(即使它们看起来是有序的)。在我明确地将 order 子句添加到 SQL 查询之后:

ORDER BY StatDate

...趋势线显示正确。 所以经过几个月的搜索,我可以关闭这个问题。