will barnes

Members
  • Content count

    1
  • Joined

  • Last visited

About will barnes

  • Rank
    Forum Newbie
  1. Uncaught Typeerror: Illegal Invocation

    I ran across this error message, so I figured I'd log my solution here in the off chance that it helps someone fix their problem. Original Error Message: Uncaught RuntimeException: #25081850 chartObjectId-1::RendererManager Error >> There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. So I ended up enabling js debugMode with the below lines of code: FusionCharts.debugMode.enabled(true); FusionCharts.debugMode.outputTo(console.log); New Error Message: Uncaught TypeError: Illegal invocation This gave me no direction. I began throwing debug statements all over the place, and stepped through the code until I decided I would be unable to track down the bug this way. What I did to find the fix: I began playing with the values I was passing in to FusionCharts. 1 - Checked to make sure my JSON data object was being converted to the correct xml format 2 - Made sure the file path to the .swf file was correct 3 - Checked that the height & width properties I was passing in was not causing the code to break. The Solution Turns out I was passing in a 0 height and 0 width for the chart size which was breaking the rendering of the chart. I had some code that was automatically determining what size the chart should be, and it was coming up with 0x0. I manually plugged in 100x100 and everything started working.