Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/OxyPlot/Series/PolygonItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public string ToCode()
{
// TODO: teach FormatConstructor to translate arrays
var outlineCode = string.Format("new DataPoint[][] {0}", string.Join(",", this.Outlines.Select(outline => string.Format("new DataPoint[] {0}", outline.Select(p => p.ToCode())))));
return CodeGenerator.FormatConstructor(this.GetType(), "{0},{2}", outlineCode, this.Value);
return CodeGenerator.FormatConstructor(this.GetType(), "{0},{1}", outlineCode, this.Value);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Source/OxyPlot/Series/PolygonSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected void RenderPolygons(IRenderContext rc, ICollection<PolygonItem> items)
foreach (var outline in item.Outlines)
{
screenPointOutline.Clear();
screenPointOutline.AddRange(outline.Select(Transform));
screenPointOutline.AddRange(outline.Select(this.Transform));

rc.DrawPolygon(
screenPointOutline,
Expand Down Expand Up @@ -281,7 +281,7 @@ public override TrackerHitResult GetNearestPoint(ScreenPoint point, bool interpo

// check against polygon
screenPointOutline.Clear();
screenPointOutline.AddRange(item.Outlines[i].Select(Transform));
screenPointOutline.AddRange(item.Outlines[i].Select(this.Transform));

if (ScreenPointHelper.IsPointInPolygon(point, screenPointOutline))
{
Expand Down