本文整理汇总了C#中TimeSeries.GetNormalized方法的典型用法代码示例。如果您正苦于以下问题:C# TimeSeries.GetNormalized方法的具体用法?C# TimeSeries.GetNormalized怎么用?C# TimeSeries.GetNormalized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSeries
的用法示例。
在下文中一共展示了TimeSeries.GetNormalized方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawStock
public void DrawStock(TimeSeries timeSeriesData, TimeSeries ts, double start, double end)
{
Clear();
int lx = 230;
int ly = 120;
var rect = new Rect((ActualWidth - lx)/2, (ActualHeight - ly)/2 - 50, lx, ly);
_xyAxis = new XyAxis(rect);
double stockMin = ts.Values.Min();
double stockMax = ts.Values.Max();
var ampDelta = (decimal) (stockMax - stockMin);
int timeDelta = ts.Values.Count;
_axisAnnotations[XyAxisLabelPosition.X_Center] = timeDelta.ToString();
IList<Stroq> ampDeltaStroqs = _letters.StringToStroqs(ampDelta + "M", 10);
IList<Stroq> timeDeltaStroqs = _letters.StringToStroqs(timeDelta.ToString(), 10);
Point ampDeltaCoords = _xyAxis.GetLabelCoords(XyAxisLabelPosition.Y_Center);
ampDeltaCoords.X -= 20;
Point timeDeltaCoords = _xyAxis.GetLabelCoords(XyAxisLabelPosition.X_Center);
timeDeltaCoords.X += 15;
timeDeltaCoords.Y += 10;
_stroqs.Add(_xyAxis.Stroq);
ts = ts.GetNormalized();
ts.Resample(80);
Stroq s = ts.ToStroq(rect);
_queryStroqs.Add(s);
_stroqs.Add(s);
foreach (Stroq stroq in timeDeltaStroqs)
{
stroq.Translate(timeDeltaCoords);
_stroqs.Add(stroq);
}
Redraw();
}