本文整理汇总了C#中System.Line.AddPointByChange方法的典型用法代码示例。如果您正苦于以下问题:C# Line.AddPointByChange方法的具体用法?C# Line.AddPointByChange怎么用?C# Line.AddPointByChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Line
的用法示例。
在下文中一共展示了Line.AddPointByChange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillLine
private void FillLine(Line line, ISprint sprint, Issue[] issues, IEnumerable<string> ignoreTypes)
{
var sprintStart = new DateTime(sprint.Start.Ticks, DateTimeKind.Local);
issues = issues.Where(i => !ignoreTypes.Contains(i.Type)).ToArray();
var issueCount = issues.Count(i => i.Value.HasValue);
var issueTotal = issues.Sum(i => i.Value != null ? i.Value.Value : 0);
var averageValue = issueTotal/issueCount;
issueTotal = issues.Sum(i => i.Value != null ? i.Value.Value : averageValue);
line.AddPoint(issueTotal, sprintStart);
var pointIssues = issues.Where(i => i.Timestamp.HasValue).OrderBy(i => i.Timestamp.Value);
foreach (var pointIssue in pointIssues)
{
var value = pointIssue.Value.HasValue ? pointIssue.Value.Value : averageValue;
var change = (float) (value*-1.0);
var timestamp = pointIssue.Timestamp.Value;
if (timestamp < sprintStart)
timestamp = sprintStart;
var point = line.AddPointByChange(change, timestamp);
point.Label = pointIssue.Id;
point.Description = pointIssue.Summary;
point.Estimate = pointIssue.Value.HasValue ? (int) pointIssue.Value.Value : (int?) null;
point.Url = "http://davidweekleyhomes.myjetbrains.com/youtrack/issue/" + pointIssue.Id;
}
}