Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates in lollipops #768

Merged
merged 12 commits into from
Apr 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add conditional including of zero to the Y-range for the lollipop geo…
…metry.
  • Loading branch information
ASmirnov-HORIS committed Apr 24, 2023
commit 351997cc90a8f14bfd71c9e460c3f1926ff73aa5
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import jetbrains.datalore.plot.base.data.TransformVar
import jetbrains.datalore.plot.base.geom.GeomBase
import jetbrains.datalore.plot.base.geom.LiveMapGeom
import jetbrains.datalore.plot.base.geom.LiveMapProvider
import jetbrains.datalore.plot.base.geom.LollipopGeom
import jetbrains.datalore.plot.base.interact.ContextualMapping
import jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpec
import jetbrains.datalore.plot.base.interact.MappedDataAccess
Expand Down Expand Up @@ -320,7 +321,11 @@ class GeomLayerBuilder(
override fun rangeIncludesZero(aes: Aes<*>): Boolean {
@Suppress("NAME_SHADOWING")
val aes = aes.afterOrientation(isYOrientation)
return aestheticsDefaults.rangeIncludesZero(aes)
return if (geom is LollipopGeom && aes == Aes.Y) {
geom.direction == LollipopGeom.Direction.ORTHOGONAL_TO_AXIS && geom.slope == 0.0 && geom.intercept == 0.0
} else {
aestheticsDefaults.rangeIncludesZero(aes)
}
}

override fun setLiveMapProvider(liveMapProvider: LiveMapProvider) {
Expand Down