Skip to content

Commit 4ced53f

Browse files
committed
Fix references to RectangleItem in HistogramSeries
1 parent 2c254dc commit 4ced53f

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ All notable changes to this project will be documented in this file.
5858
- CandleStick is overlapped when item.open == item.close in the CandleStickAndVolumeSeries (#1245)
5959
- Out of memory exception and performance issue with Catmull-Rom Spline (#1237)
6060
- Cache and Dispose Brush and Pen objects used by GraphicsRenderContext (#1230)
61+
- Fixed references to RectangleItem in HistogramSeries
6162

6263
## [1.0.0] - 2016-09-11
6364
### Added

Source/OxyPlot/Series/HistogramSeries.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public OxyColor ActualFillColor
142142
/// <summary>
143143
/// Gets the list of <see cref="HistogramItem" /> that should be rendered.
144144
/// </summary>
145-
/// <value>A list of <see cref="RectangleItem" />.</value>
145+
/// <value>A list of <see cref="HistogramItem" />.</value>
146146
protected List<HistogramItem> ActualItems => this.ItemsSource != null ? this.actualItems : this.Items;
147147

148148
/// <summary>
@@ -211,7 +211,7 @@ public override TrackerHitResult GetNearestPoint(ScreenPoint point, bool interpo
211211

212212
if (this.ActualItems != null)
213213
{
214-
// iterate through the DataRects and return the first one that contains the point
214+
// iterate through the HistogramItems and return the first one that contains the point
215215
foreach (var item in this.ActualItems)
216216
{
217217
if (item.Contains(p))
@@ -536,20 +536,20 @@ private void UpdateActualItems()
536536
return;
537537
}
538538

539-
var sourceAsListOfDataRects = this.ItemsSource as List<HistogramItem>;
540-
if (sourceAsListOfDataRects != null)
539+
var sourceAsListOfHistogramItems = this.ItemsSource as List<HistogramItem>;
540+
if (sourceAsListOfHistogramItems != null)
541541
{
542-
this.actualItems = sourceAsListOfDataRects;
542+
this.actualItems = sourceAsListOfHistogramItems;
543543
this.ownsActualItems = false;
544544
return;
545545
}
546546

547547
this.ClearActualItems();
548548

549-
var sourceAsEnumerableDataRects = this.ItemsSource as IEnumerable<HistogramItem>;
550-
if (sourceAsEnumerableDataRects != null)
549+
var sourceAsEnumerableHistogramItems = this.ItemsSource as IEnumerable<HistogramItem>;
550+
if (sourceAsEnumerableHistogramItems != null)
551551
{
552-
this.actualItems.AddRange(sourceAsEnumerableDataRects);
552+
this.actualItems.AddRange(sourceAsEnumerableHistogramItems);
553553
}
554554
}
555555
}

0 commit comments

Comments
 (0)