-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: Demo接入 TYMark NSUIColor 添加mark改动 bugfix 添加极限线之间的颜色 添加 自定义Mark
- Loading branch information
Showing
11 changed files
with
180 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// SleepMarkerView.swift | ||
// Meum | ||
// | ||
// Created by fanrong on 2017/11/29. | ||
// Copyright © 2017年 huangwei. All rights reserved. | ||
// | ||
|
||
// | ||
// XYMarkerView.swift | ||
// ChartsDemo | ||
// Copyright © 2016 dcg. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Charts | ||
|
||
|
||
@objc protocol TYMarkerViewDelegate { | ||
@objc func tyMarkerViewRefreshContentAttString(mark:TYMarkerView, entry: ChartDataEntry, highlight: Highlight) -> NSAttributedString | ||
} | ||
|
||
open class TYMarkerView: BalloonMarker | ||
{ | ||
@objc weak var delegate: TYMarkerViewDelegate? | ||
|
||
fileprivate var yFormatter = NumberFormatter() | ||
|
||
@objc public override init(color: UIColor, font: UIFont, textColor: UIColor, insets: UIEdgeInsets) | ||
{ | ||
super.init(color: color, font: font, textColor: textColor, insets: insets) | ||
yFormatter.minimumFractionDigits = 0 | ||
yFormatter.maximumFractionDigits = 0 | ||
} | ||
|
||
open override func refreshContent(entry: ChartDataEntry, highlight: Highlight) | ||
{ | ||
if let delegate = delegate { | ||
let attString = delegate.tyMarkerViewRefreshContentAttString(mark: self, entry: entry, highlight: highlight) | ||
setAttLabel(attString); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters