Open
Description
(This issue was created because PR #117 could not be finished in its entirety)
The point labels that are shown on mouseover can be pretty hard to read. Two ideas are proposed:
- add an opaque or semi-opaque backdound and use constant-color text
- Adjust the label location if it would fall out of bounds.
Currently hover labels are shown as simply the inverse color of the background item (blit XOR).
It would be much easier to read if there were a background box (either opaque or semi-opaque) and constant-color text.
In addition, the current algorithm for hover label placement doesn't take into account the bounds of the widget - getting a label for a point that is near the right edge cuts off the label and makes it impossible to read.
When near the right edge of the widget, hover labels should be displayed to the left of the point, etc.:
# Example psudo-code for label positioning
if near_right_of_widget:
label_pos = left_of_point
elif near_top_of_widget:
label_pos = bottom_of_point
elif near_bottom_of_widget:
label_pos = top_of_point
elif near_left_of_widget:
label_pos = right_of_point