JetBrains / JetBrains/lets-plot
geom_segment(): two layers with own datasets break the tooltips
- Dominant language
- Kotlin
- Stars
- 1.8k
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
When there are two `geom_segment()` layers, each with its own dataset, it may happen that tooltips do not appear for some segments.
Example:
```python
data1 = {'x': [0], 'y': [0], 'xend': [1], 'yend': [0], 'text': ['text 1']}
data2 = {'x': [0], 'y': [1], 'xend': [2], 'yend': [1], 'text': ['text 2']}
ggplot() + \
geom_segment(aes('x', 'y', xend='xend', yend='yend'), \
data=data1, \
tooltips=layer_tooltips().line("@text")) + \
geom_segment(aes('x', 'y', xend='xend', yend='yend'), \
data=data2, \
tooltips=layer_tooltips().line("@text"))
```
In this case, we did not see the tooltips for the bottom segment.
This is due to the positions of the segments. For example, if you shift the x-coordinate in the second dataset (replace 0 with 1), the tooltips will appear.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.