Bar Chart (Uncaught RangeError: Maximum call stack size exceeded )

1,737 views
Skip to first unread message

Eamonn O'Loughlin

unread,
Jun 14, 2013, 6:08:12 AM6/14/13
to dc-js-us...@googlegroups.com
Hi All,

I'm hoping somebody can help me in toubleshooting getting a dynamic bar chart (based on a time axis working). I have created a jsfiddle, and if you open it it should be clear what my problem is.

http://jsfiddle.net/ieeamo/JB9aB/

Best,
Eamonn

Nick Zhu

unread,
Jun 14, 2013, 12:59:44 PM6/14/13
to Eamonn O'Loughlin, dc-js-us...@googlegroups.com
Hi Eamonn,

I tried the fiddle and did not see any error though. 


Cheers,

NIck

Eamonn O'Loughlin

unread,
Jun 14, 2013, 1:39:51 PM6/14/13
to Nick Zhu, dc-js-us...@googlegroups.com
There is an error in the console when I try filter the chart (see below).
 

Capture.PNG

Gordon Woodhull

unread,
Jun 14, 2013, 10:10:17 PM6/14/13
to dc-js-us...@googlegroups.com, Eamonn O'Loughlin, Nick Zhu
I was able to repro.  Looks like you've set your chart as its own dimension, so that when the chart tries to filter by dimension, it just recurses and blows up.

 betFreq.width(700)
  .height(200)
  .dimension(betFreq)

You probably meant betFrequency here.

The clue is that the stack in the exception is repeating:

  1. applyFilters
  2. resetFilters
  3. _chart.filter
  4. (anonymous function)
  5. _filterHandler
  6. applyFilters
  7. resetFilters
  8. _chart.filter
  9. (anonymous function)
  10. _filterHandler
  11. applyFilters
  12. resetFilters
  13. _chart.filter
  14. (anonymous function)
  15. _filterHandler
  16. applyFilters
  17. resetFilters
  18. _chart.filter
  19. (anonymous function)
  20. _filterHandler
  21. applyFilters
  22. resetFilters
  23. _chart.filter
  24. (anonymous function)
  25. _filterHandler
  26. applyFilters
  27. resetFilters
  28. _chart.filter
  29. (anonymous function)
  30. _filterHandler
  31. applyFilters
  32. resetFilters
  33. _chart.filter
  34. (anonymous function)
  35. _filterHandler
  36. applyFilters
  37. resetFilters
  38. _chart.filter
  39. (anonymous function)
  40. _filterHandler
  41. applyFilters
  42. resetFilters
  43. _chart.filter


<Capture.PNG>

Eamonn O'Loughlin

unread,
Jun 15, 2013, 2:51:26 AM6/15/13
to Gordon Woodhull, dc-js-us...@googlegroups.com, Nick Zhu
Yes! I guess the problem is that the x-axis (which is a time axis) does not have the correct intervals.
I've tried to program the units to be rounded months, yet the units appear to me full date (including day, time etc.).
As there are a large number of such dates over the interval, I think it reaches a 'Maximum call stack error'
Any idea how to use rounded months for the date?

Eamonn
Reply all
Reply to author
Forward
0 new messages