feat: Add simpler line function if user wants no settings (#29)

This commit is contained in:
Florian Bouillon 2023-01-13 10:27:17 +01:00 committed by GitHub
parent 890d474ab4
commit edd78e87e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -205,6 +205,10 @@ class YAxis(
lines[y] = line
}
override fun addLine(y: Float) {
this.addLine(y, Line())
}
override fun removeLine(y: Float) {
lines.remove(y)
}

View File

@ -100,11 +100,18 @@ sealed interface YAxisInterface {
/**
* add a line on the Chart
*
* @param y the Y position of the line
* @param paint the Paint of the line if you want to have a custom one
* @param y the line's Y position
* @param line The line's settings
*/
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
*