JetBrains / JetBrains/lets-plot

Add an option to configure axis tooltips when user-defined breaks are provided

Open
#1,178 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.8k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Consider two plots:
```python
from lets_plot import *
LetsPlot.setup_html()

gggrid([
ggplot(
{
'x': [0, 1, 2, 3, 4, 5, 6],
'y': [0, 0, 0, 0, 0, 0, 0]
},
aes('x', 'y')
) \
+ geom_point() \
+ scale_x_continuous(breaks={'min': 0, '2': 2, '4': 4, 'max': 6}),
ggplot(
{
'x': [0, 1, 2, 3, 4],
'y': [10, 29, 17, 42, 1]
},
aes('x', 'y')
) \
+ geom_point() \
+ scale_x_continuous(breaks={'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4})
])
```

In the first plot, when the pointer hovers over min/max points, it might be acceptable to display either "min" or 0. Therefore, an option to toggle between these two display modes is necessary. If the point doesn't have a corresponding break, the domain value should be displayed.

In the second plot, when the pointer hovers over any point, the tooltip should display the break value instead of the domain value. An option to configure this behavior will be helpful in this case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.