Skip to content

Commit

Permalink
圆心高亮bugfix mark消失时候,圆心高亮取消
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyZeng committed Dec 12, 2017
1 parent 0085d0e commit 146afb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
if (valuesToHighlight())
{
renderer.drawHighlighted(context: context, indices: _indicesToHighlight)
}else {
renderer.drawHighlighted(context: context, indices: [])
}

context.restoreGState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet
/// **default**: Linear
open var mode: Mode = Mode.linear

// 当选中时填充颜色, drawVerticalBottomHalfHighlightIndicatorEnabled 生效时使用
// 当选中时填充颜色,circleHoleColor != [UIColor clearColor]生效
@objc open var highlightHollowFillColor: NSUIColor = NSUIColor.clear
/// 是否显示点到底部的下半部分虚线(最底部有一小段实线),开启后 drawVerticalHighlightIndicatorEnabled 失效
@objc open var drawVerticalBottomHalfHighlightIndicatorEnabled = false
Expand Down
13 changes: 0 additions & 13 deletions Source/Charts/Renderers/LineChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -662,19 +662,6 @@ open class LineChartRenderer: LineRadarRenderer

if drawTransparentCircleHole
{
if let curHighlights = curHighlights {
for high in curHighlights {
if let set = lineData.getDataSetByIndex(high.dataSetIndex) as? LineChartDataSet
, set.isHighlightEnabled {

if let hightE = set.entryForXValue(high.x, closestToY: high.y), isInBoundsX(entry: hightE, dataSet: set) {
if hightE.isEqual(e) { context.setFillColor(set.highlightHollowFillColor.cgColor)
}
}
}
}
}

// Begin path for circle with hole
context.beginPath()
context.addEllipse(in: rect)
Expand Down

0 comments on commit 146afb7

Please sign in to comment.