knowthelist / fhem-tablet-ui

UI builder framework for FHEM
MIT License
148 stars 84 forks source link

Charts with swiper - cursor gets lost #196

Open malcb opened 7 years ago

malcb commented 7 years ago

I've used chart to produce a plot of a max rad valve, desired temperature, actual temperature and valve percentage. I've made this a template and wrapped a swiper around it. Swiping the charts seems to confuse the cursor. It is ok on the first chart but subsequent charts it gets lost.

If I make all the cursor groups the same then you can see the cursor moving on the first chart if you swipe an hold halfway in between so you can see both charts. Making groups all different means I can't see any cursor

malcb commented 7 years ago

Update: I've found that zooming out then in again brings the cursor to the current chart in swiper. Looking at the code I wonder if it is the create for the cursor which defaults to it being x=51%.

Update: Ignore the 51% that is the position of the "cursor" text.

malcb commented 7 years ago

There is another bug in chart. Turn on cursor and you get the cursor and the values of the plots displayed. Turn off the cursor and it stops working but cursor is still on screen as are the last value. Clicking +/- to cause a plot refresh makes the cursor and values disappear.

I think both of these bugs are due to the plot not being refreshed when the cursor is enable or disabled.