如何基于访客会话滚动数据在Golang中绘制渐变滚动地图

时间:2019-07-19 03:33:12

标签: go gradient

我想根据访问者会话滚动数据在Golang中将滚动图绘制为渐变矩形。

访客滚动数据为:

{
  "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},
.....
}

我想要的结果是: result

enter image description here

在访问者会话数据中,值是浏览器中的滚动位置。如果渐变Y = 150的位置具有100%用户滚动到的位置,则表示它更受欢迎,并且将填充为红色

0 个答案:

没有答案