mirror of
https://github.com/dzeiocom/charts.git
synced 2025-04-23 02:52:10 +00:00
feat: Add simpler line function if user wants no settings (#29)
This commit is contained in:
parent
890d474ab4
commit
edd78e87e1
@ -205,6 +205,10 @@ class YAxis(
|
|||||||
lines[y] = line
|
lines[y] = line
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun addLine(y: Float) {
|
||||||
|
this.addLine(y, Line())
|
||||||
|
}
|
||||||
|
|
||||||
override fun removeLine(y: Float) {
|
override fun removeLine(y: Float) {
|
||||||
lines.remove(y)
|
lines.remove(y)
|
||||||
}
|
}
|
||||||
|
@ -100,11 +100,18 @@ sealed interface YAxisInterface {
|
|||||||
/**
|
/**
|
||||||
* add a line on the Chart
|
* add a line on the Chart
|
||||||
*
|
*
|
||||||
* @param y the Y position of the line
|
* @param y the line's Y position
|
||||||
* @param paint the Paint of the line if you want to have a custom one
|
* @param line The line's settings
|
||||||
*/
|
*/
|
||||||
fun addLine(y: Float, line: Line)
|
fun addLine(y: Float, line: Line)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add a line on the Chart
|
||||||
|
*
|
||||||
|
* @param y the Y position of the line
|
||||||
|
*/
|
||||||
|
fun addLine(y: Float)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remove a line one the specified position
|
* remove a line one the specified position
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user