clarity icon indicating copy to clipboard operation
clarity copied to clipboard

heatmap visualize

Open yvywang opened this issue 3 years ago • 1 comments

Is it possible to provide heatmap data structure generation logic? for use clarity-visualize -> clickmap and scrollmap params how to product thank so muck ! @ @

yvywang avatar Dec 30 '21 09:12 yvywang

Please take a look here: https://github.com/microsoft/clarity/blob/master/packages/clarity-visualize/types/visualize.d.ts#L85

The generation logic is that for every element (represented by hash and selector computed #here) we group all clicks by X, Y, SUM() in corresponding arrays. Here X & Y are normalized to the scale of 2^15 - 1 to not lose precision (see here). Hope this helps.

sarveshnagpal avatar Jan 10 '22 16:01 sarveshnagpal