diff --git a/vico/core/src/main/java/com/patrykandpatrick/vico/core/cartesian/layer/spec/SplitLine.kt b/vico/core/src/main/java/com/patrykandpatrick/vico/core/cartesian/layer/spec/SplitLine.kt index a732b6135..913e840a2 100644 --- a/vico/core/src/main/java/com/patrykandpatrick/vico/core/cartesian/layer/spec/SplitLine.kt +++ b/vico/core/src/main/java/com/patrykandpatrick/vico/core/cartesian/layer/spec/SplitLine.kt @@ -90,9 +90,14 @@ public class SplitLine( /* right = */ bounds.right, /* bottom = */ bounds.bottom, ) - super.drawBackground(context, firstBounds, zeroLineYFraction, path, opacity) + + if (firstBounds.isEmpty.not()) { + super.drawBackground(context, firstBounds, zeroLineYFraction, path, opacity) + } backgroundShader = backgroundShaderSecond - super.drawBackground(context, secondBounds, zeroLineYFraction, path, opacity) + if (secondBounds.isEmpty.not()) { + super.drawBackground(context, secondBounds, zeroLineYFraction, path, opacity) + } backgroundShader = backgroundShaderFirst } }