2

I try to build a streamgraph to visualize similar terms over time, but it always returns NaN for y0. I compared my solution with several ones on the internet but can't make out a difference. Here is the code:

github.com/adius/simterm

Any help would be really appreciated, as I'm about to go mad. ;'(

VividD
  • 10,456
  • 6
  • 64
  • 111
adius
  • 13,685
  • 7
  • 45
  • 46
  • 1
    Could you post a complete example that demonstrates the problem please? – Lars Kotthoff Nov 30 '13 at 15:42
  • Just open the index.html file in the repo I posted. It should display the streamgraph but it doesn't. The code is in the test.js file. – adius Dec 01 '13 at 16:55
  • 1
    Your code works fine if you change the offset to anything but "wiggle". That particular offset considers the slope of the graph, i.e. consecutive values. My guess is that there are gaps in your data (i.e. values defined for a particular time for one series, but not another). – Lars Kotthoff Dec 01 '13 at 17:36
  • Thanks so much! You saved my day! =) … but there are no gaps in the data, so it must be something else… – adius Dec 02 '13 at 19:31
  • Hmm, I'm afraid that the code that calculates that interpolation is rather obfuscated, so I can't put my finger on it. You'll probably find it if you have a look at the data though. – Lars Kotthoff Dec 02 '13 at 19:37

0 Answers0