cljsjs / packages

DEPRECATED: Javascript libraries packaged up with Google Closure externs
http://cljsjs.github.io
787 stars 816 forks source link

[Request] Highmaps (from highcharts.com) #1029

Open BorisVSchmid opened 7 years ago

BorisVSchmid commented 7 years ago

Latest version is available at http://code.highcharts.com/maps/highmaps.src.js (they are now at 5.0.7)

I tried following the instructions to generate the extern myself using http://jmmk.github.io/javascript-externs-generator/, but I get an error message

Error generating extern RangeError: Maximum call stack size exceeded. Check console for stack trace.

Looking at console, I see this:

RangeError: Maximum call stack size exceeded at hh.h.Wa (javascript_externs_generator.js:346) at mh.h.Wa (javascript_externs_generator.js:351) at mh.h.Wa (javascript_externs_generator.js:351) ... ... a few hundred more ... at javascript_externs_generator.js:804 at PB.h.Ld (javascript_externs_generator.js:806) at HB (javascript_externs_generator.js:797) at javascript_externs_generator.js:801 at MessagePort.a.port1.onmessage (javascript_externs_generator.js:796)

but then I am stuck. There is a hint in the package cljsjs/highcharts that the author uploading that one to cljsjs needed some tricks to avoid a stack overflow as well, but I am not familiar enough with the console to understand what he did:

https://github.com/cljsjs/packages/blob/master/highcharts/resources/cljsjs/highcharts/common/highcharts.ext.js :

Highcharts.win set to null in browser console to avoid stack overflow Manually added series attribute added in commit 974c76441690ea2c9678a30738f295012b928f27 Manually added percentage attribute added in commit d340e65bfe1267ee8384d0ee7b9d114fcbfe6947

Any hints or anyone adding the package highly appreciated!

BorisVSchmid commented 7 years ago

@jimlar @tkataja Could either of you help me? The hints left about how to generate an extern file in the highcharts package said to set Highcharts.win to null in the browser console, but I might be missing something obvious (not familiar with javascript), as I get an error when I set Highcharts.win to null in the browser console (I am trying to generate a Highmaps package).

Highcharts.win = null VM413:1 Uncaught ReferenceError: Highcharts is not defined at <anonymous>:1:1

Also, do you set Highcharts.win before or after you Extern! the js file in http://jmmk.github.io/javascript-externs-generator/ ?