Interactive k means javascript