Skip to content

Commit

Permalink
折线图 底部线条定制增加属性控制
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyZeng committed Dec 12, 2017
1 parent 0bbf930 commit 0337b01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet
/// **default**: Linear
open var mode: Mode = Mode.linear

// 当选中时填充颜色
@objc public var highlightHollowFillColor: NSUIColor = NSUIColor.clear
// 当选中时填充颜色, drawVerticalBottomHalfHighlightIndicatorEnabled 生效时使用
@objc open var highlightHollowFillColor: NSUIColor = NSUIColor.clear
/// 是否显示点到底部的下半部分虚线(最底部有一小段实线),开启后 drawVerticalHighlightIndicatorEnabled 失效
@objc open var drawVerticalBottomHalfHighlightIndicatorEnabled = false

fileprivate var _cubicIntensity = CGFloat(0.2)

Expand Down
3 changes: 1 addition & 2 deletions Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ open class LineScatterCandleRadarRenderer: BarLineScatterCandleBubbleRenderer
{

// draw vertical highlight lines

if let set = set as? LineChartDataSet, set.isVerticalHighlightIndicatorEnabled {
if let set = set as? LineChartDataSet, set.drawVerticalBottomHalfHighlightIndicatorEnabled {
let cornerRadius:CGFloat = 3

let pointRect = CGRect(x: point.x - cornerRadius , y: point.y - cornerRadius, width: cornerRadius * 2, height: cornerRadius * 2)
Expand Down

0 comments on commit 0337b01

Please sign in to comment.