Skip to content

Commit

Permalink
长按高亮线支持虚线
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiqian committed Nov 27, 2022
1 parent edf3b1b commit 01e0f96
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ open class KChart(
stockChart.getConfig().highlightHorizontalLineColor
highlightHorizontalLinePaint.strokeWidth =
stockChart.getConfig().highlightHorizontalLineWidth
highlightHorizontalLinePaint.pathEffect =
stockChart.getConfig().highlightHorizontalLinePathEffect

var highlightHorizontalLineLeft = getChartDisplayArea().left
var highlightHorizontalLineRight = getChartDisplayArea().right
Expand Down Expand Up @@ -339,6 +341,8 @@ open class KChart(
stockChart.getConfig().highlightVerticalLineColor
highlightVerticalLinePaint.strokeWidth =
stockChart.getConfig().highlightVerticalLineWidth
highlightVerticalLinePaint.pathEffect =
stockChart.getConfig().highlightVerticalLinePathEffect

tmp2FloatArray[0] = highlight.getIdx() + 0.5f
tmp2FloatArray[1] = 0f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ class KdjChart(stockChart: IStockChart, chartConfig: KdjChartConfig) :
stockChart.getConfig().highlightHorizontalLineColor
highlightHorizontalLinePaint.strokeWidth =
stockChart.getConfig().highlightHorizontalLineWidth
highlightHorizontalLinePaint.pathEffect =
stockChart.getConfig().highlightHorizontalLinePathEffect

var highlightHorizontalLineLeft = getChartDisplayArea().left
var highlightHorizontalLineRight = getChartDisplayArea().right
Expand Down Expand Up @@ -303,6 +305,8 @@ class KdjChart(stockChart: IStockChart, chartConfig: KdjChartConfig) :
stockChart.getConfig().highlightVerticalLineColor
highlightVerticalLinePaint.strokeWidth =
stockChart.getConfig().highlightVerticalLineWidth
highlightVerticalLinePaint.pathEffect =
stockChart.getConfig().highlightVerticalLinePathEffect

tmp2FloatArray[0] = highlight.getIdx() + 0.5f
tmp2FloatArray[1] = 0f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ class MacdChart(
stockChart.getConfig().highlightHorizontalLineColor
highlightHorizontalLinePaint.strokeWidth =
stockChart.getConfig().highlightHorizontalLineWidth
highlightHorizontalLinePaint.pathEffect =
stockChart.getConfig().highlightHorizontalLinePathEffect

var highlightHorizontalLineLeft = getChartDisplayArea().left
var highlightHorizontalLineRight = getChartDisplayArea().right
Expand Down Expand Up @@ -339,6 +341,8 @@ class MacdChart(
stockChart.getConfig().highlightVerticalLineColor
highlightVerticalLinePaint.strokeWidth =
stockChart.getConfig().highlightVerticalLineWidth
highlightVerticalLinePaint.pathEffect =
stockChart.getConfig().highlightVerticalLinePathEffect

tmp2FloatArray[0] = highlight.getIdx() + 0.5f
tmp2FloatArray[1] = 0f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class VolumeChart(
stockChart.getConfig().highlightHorizontalLineColor
highlightHorizontalLinePaint.strokeWidth =
stockChart.getConfig().highlightHorizontalLineWidth
highlightHorizontalLinePaint.pathEffect =
stockChart.getConfig().highlightHorizontalLinePathEffect

var highlightHorizontalLineLeft = getChartDisplayArea().left
var highlightHorizontalLineRight = getChartDisplayArea().right
Expand Down Expand Up @@ -233,6 +235,8 @@ class VolumeChart(
stockChart.getConfig().highlightVerticalLineColor
highlightVerticalLinePaint.strokeWidth =
stockChart.getConfig().highlightVerticalLineWidth
highlightVerticalLinePaint.pathEffect =
stockChart.getConfig().highlightVerticalLinePathEffect

tmp2FloatArray[0] = highlight.getIdx() + 0.5f
tmp2FloatArray[1] = 0f
Expand Down
4 changes: 2 additions & 2 deletions samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android:flexbox:2.0.1'

// implementation project(':lib')
implementation 'com.github.wangyiqian:StockChart:1.1.10'
implementation project(':lib')
// implementation 'com.github.wangyiqian:StockChart:1.1.10'
}

0 comments on commit 01e0f96

Please sign in to comment.