Skip to content

Commit

Permalink
feat: Allow to clear every horizontal lines (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviortheking authored Feb 14, 2023
1 parent b2c51f7 commit dd023f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
root = true

# Base Configuration
[*]
indent_style = tab
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
end_of_line = lf

# Markdown Standards
[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false


# Java/Kotlin Standards
[*.{java,kt,kts,gradle,xml}]
indent_style = space
[*.{kt,kts}]
ktlint_code_style = android
4 changes: 4 additions & 0 deletions library/src/main/java/com/dzeio/charts/axis/YAxis.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ class YAxis(
lines.remove(y)
}

override fun clearLines() {
lines.clear()
}

@Deprecated("use the new global function", ReplaceWith("YAxisInterface.addLine"))
override fun setGoalLine(height: Float?) {
if (height != null) {
Expand Down
5 changes: 5 additions & 0 deletions library/src/main/java/com/dzeio/charts/axis/YAxisInterface.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ sealed interface YAxisInterface {
*/
fun removeLine(y: Float)

/**
* Remove every lines
*/
fun clearLines()

/**
* get the position of an [entry] Y position in the [drawableSpace]
*
Expand Down

0 comments on commit dd023f9

Please # to comment.