jquery - Javascript heatmap ReferenceError h337.create -


i modifying existing project github uses heatmap.js generate heatmap match in game "counter-strike: global offensive", original developer did not seem finish part of code or has bugs in it. firebug console says error:

referenceerror: h337 not defined var heatmap = h337.create( 

this line seems blame: https://github.com/destro/ebot-csgo-web/blob/master/apps/backend/modules/matchs/templates/_stats_heatmap.php#l26

i think there typo/error somewhere here, after spending hours trying locate unable so.

i tried generating heatmap using both chrome (v46.0.2490.80), firefox (v41.0.2) nothing happens , error logged typeerror 1 have go after.

any tips/hints can causing this? have been googling/searching stackoverflow similar issues without success, think there silly overlooking..

change line

var heatmap = h337.create( 

to

var heatmap = window.h337.create( 

update:

okay lucky found error, have pass "container" property heatmap options:

    heatmap = window.h337.create(     {         "container": document.getelementbyid("heatmaparea"),         "element": document.getelementbyid("heatmaparea"),         "radius" : 11,         "opacity": 40,         "visible": true,         "gradient" : { 0.45: "rgb(0,0,255)", 0.55: "rgb(0,255,255)", 0.65: "rgb(0,255,0)", 0.95: "yellow", 1: "rgb(255,0,0)"}     }) 

for me works :)


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -