diff --git a/library/src/main/java/com/dzeio/charts/axis/XAxis.kt b/library/src/main/java/com/dzeio/charts/axis/XAxis.kt index dd76d41..5dde1a5 100644 --- a/library/src/main/java/com/dzeio/charts/axis/XAxis.kt +++ b/library/src/main/java/com/dzeio/charts/axis/XAxis.kt @@ -20,7 +20,7 @@ class XAxis( override var x: Double = 0.0 set(value) { - val max = getXMax() - getDataWidth() + val max = getXMax() val min = getXMin() field = value.coerceIn(min, max.coerceAtLeast(min)) diff --git a/library/src/main/java/com/dzeio/charts/axis/XAxisInterface.kt b/library/src/main/java/com/dzeio/charts/axis/XAxisInterface.kt index e109720..270426f 100644 --- a/library/src/main/java/com/dzeio/charts/axis/XAxisInterface.kt +++ b/library/src/main/java/com/dzeio/charts/axis/XAxisInterface.kt @@ -91,4 +91,4 @@ sealed interface XAxisInterface { * return the height of the XAxis (available after first draw) */ fun getHeight(): Float? -} \ No newline at end of file +}