Hovermode in table/mobile versions

I have a checkbox in my app, that depending on whether it is checked or not, we are showing one type of hovermode or another.

hovermode: showValuesDetails ? 'x unified' : 'closest',

So, if the checkbox is active, the showValuesDetails variable is true and we show a larger legend with more info (x unified); and if the checkbox is unchecked, we show a shorter legend (closest).

It works on desktop but when I switch to mobile or tablet devices, it doesn’t work: the problem is that when you are on mobile or tablet, you have to click (not mouse over) on the chart values, so if you change the checkbox status from checked (unified x) to unchecked (closer) both legends appear on the chart until you click on the chart but without selecting any particular point.

Is there any way to disable the mouse over mode when using tablet or mobile devices and, in that case, what we use to see the legend is a click but conditioned to the checkbox and in each case show the corresponding hovermode (x-unified vs closest)?