Fix cursor hover bug after max labels on graph

- Fix cursor hover bug after max labels on graph.