I need to draw rectangle gradient to show the popularity of scroll position of my website visitor sessions.
Visitor scroll data as:
{
"visitor_session_key1": {159,160,444,530,531,573,821,848,858,1037,1166,1186,1210,1243,1269,1309,1318,1548,1680,1695,1965,2051,2106,2324,2369,2459,2649,2687,2707,2914,3005,3021,3197,3323,3327,3453,3588,3677,3902,3908,4087,4277,4278,4367,4595},
"visitor_session_key2": {0,1,50,80,133,202,212,245,274,346,423,424,796,1211,1553,2737,4057,4155,4313,4322,4382,4409,4513,4534,4746,4784,4875,4905,4953,5012,5064,5099,5159,5163,5170,5223,5276,5291},
.....
}
Where: 159,160,444,530,531,573,821 ... are Y position of scroll.
in visitor session data, value is scroll position in browser. If position Y = 150 in gradient has 100% user scroll to, that's mean it more popular, and will fill with red color