vico
vico copied to clipboard
Marker text is not show when data size is one
How to reproduce
There is only one data size, and the text inside the marker is not displayed when the marker is used in the line graph using the point provider.
Additionally, I'm using a basic marker and a persistent marker at the same time, and when I click it, the basic marker detects the event first and remembers the index to display the persistent mark.
#897
Observed behavior
When the data size is large, the text inside the marker pops up well, but strangely, the text doesn't pop up when it's 1 size
Expected behavior
I hope the text on the marker will pop up well even when there is 1 data.
Vico version(s)
2.0.0-beta.1
Android version(s)
minSdk is 28, comple and target sdk is 34
Additional information
marker = rememberMarker(MaterialTheme.colorScheme.surfaceVariant), markerVisibilityListener = object : CartesianMarkerVisibilityListener { override fun onHidden(marker: CartesianMarker) { // TODO("Not yet implemented") }
override fun onShown(
marker: CartesianMarker,
targets: List<CartesianMarker.Target>
) {
clickIndex(targets.first().x.toFloat())
}
},
getXStep = { 1.0 },
horizontalLayout = HorizontalLayout.FullWidth(),
persistentMarkers = rememberExtraLambda( marker) { marker at selectedIndex },