You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there - thanks for the amazing tools. 😄 I've got a bar graph working in my reagent project and am now looking at adding the GitHub-commit style visualisation.
When it comes to the commits->matrix function I'm stuck as byte-array doesn't exist in ClojureScript. I tried binding mat to ((nd/ndarray :int32 (repeat (* 7 weeks) 0) [7 weeks]) but it didn't make any difference - I get a weird error down the line:
Can I drop in a replacement for byte-array? I used int64 because int32 is not available in the CLJS version of ndarray.
I've also tried binding commits to my raw data in the actual example hm-github.clj (so running on Clojure, not ClojureScript) and it actually doesn't work, saying CompilerException java.lang.IllegalArgumentException: Value out of range for byte: 228, compiling:(/Users/farhan/code/geom/geom-viz/babel/examples/hm-github.clj:57:1) - I definitely never had 228 commits in a day! But I guess the use of a byte array assumes a certain number of commits per day? Maybe if you can talk me through generally what's happening in this code I can fix it myself...
It's worth mentioning that my timestamp data is from another source, not GitHub commits. Here is the data as a list:
Hi there - thanks for the amazing tools. 😄 I've got a bar graph working in my reagent project and am now looking at adding the GitHub-commit style visualisation.
commits->matrix
function I'm stuck asbyte-array
doesn't exist in ClojureScript. I tried bindingmat
to((nd/ndarray :int32 (repeat (* 7 weeks) 0) [7 weeks])
but it didn't make any difference - I get a weird error down the line:Can I drop in a replacement for byte-array? I used int64 because int32 is not available in the CLJS version of ndarray.
commits
to my raw data in the actual examplehm-github.clj
(so running on Clojure, not ClojureScript) and it actually doesn't work, sayingCompilerException java.lang.IllegalArgumentException: Value out of range for byte: 228, compiling:(/Users/farhan/code/geom/geom-viz/babel/examples/hm-github.clj:57:1)
- I definitely never had 228 commits in a day! But I guess the use of a byte array assumes a certain number of commits per day? Maybe if you can talk me through generally what's happening in this code I can fix it myself...It's worth mentioning that my timestamp data is from another source, not GitHub commits. Here is the data as a list:
Thanks for any help you can give.
Alternatively, could you maybe show me the code for this stuff on the thi.ng homepage?
The text was updated successfully, but these errors were encountered: