-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bae2934
commit 827a726
Showing
7 changed files
with
45 additions
and
37 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
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ import android.graphics.Canvas | |
import android.graphics.Paint | ||
import com.github.wangyiqian.stockchart.IStockChart | ||
import com.github.wangyiqian.stockchart.childchart.base.BaseChildChart | ||
import kotlin.math.abs | ||
|
||
/** | ||
* @author wangyiqian E-mail: [email protected] | ||
|
@@ -59,8 +60,15 @@ class KdjChart(stockChart: IStockChart, chartConfig: KdjChartConfig) : | |
} | ||
} | ||
} | ||
result[0] = yMin | ||
result[1] = yMax | ||
|
||
if (abs(yMin - yMax) > 0.0001) { | ||
result[0] = yMin | ||
result[1] = yMax | ||
} else { // 约等于0 | ||
var delta = 2 | ||
result[0] = yMin - delta | ||
result[1] = yMax + delta | ||
} | ||
} | ||
|
||
override fun preDrawBackground(canvas: Canvas) { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ import com.github.wangyiqian.stockchart.entities.IKEntity | |
* @author wangyiqian E-mail: [email protected] | ||
* @version 创建时间: 2021/2/18 | ||
*/ | ||
sealed class Index( | ||
open abstract class Index( | ||
var param: String, | ||
var startText: String, | ||
var startTextColor: Int, | ||
|