Skip to content

v2.4.0 - Mobile chart tooltip auto-dismisses after 5 seconds

Choose a tag to compare

@hummelmose hummelmose released this 19 Jul 08:39
· 31 commits to main since this release

WP VisitChart v2.4.0

Mobile page: chart tooltip now auto-dismisses after 5 seconds.


Problem

After touching the traffic graph on the mobile page, the tooltip would stay visible indefinitely — even while scrolling away from the chart, making it awkward to read the rest of the page.


Fix

touchend and touchstart listeners on the mobile chart canvas:

  • touchend starts a 5-second timer. When it expires, the active tooltip is cleared via chart.tooltip.setActiveElements([]) and chart.update('none')
  • touchstart cancels the timer so the tooltip stays visible while the user is actively touching the chart

Tested on iOS and Android. The admin dashboard graph is unaffected.


Upgrade

Download wp-visitchart.zip below and replace the existing plugin files. No database changes required.