How to debug your charts with Google Chrome
The Google Chrome developer tools in undocked mode
When you first open the developer tools in Google Chrome (you can press
CTRL+SHIFT+J to open the tools) they usually look like
this - ie in undocked mode.
You may prefer this as it gives you more space initially or you may find
that showing them in docked mode is more convenient.
The button for switching modes is highlighted.
The Google Chrome developer tools in docked mode
This is an old video from Google IO 2010 detailing the development tools. Remember that other browsers as well as Google Chrome have developer tools - so refer to their documentation for more details.
Debug functions in RGraph
Some functions that you may find very useful when you're debugging
your charts are the
$a() function is just
an alias for the standard
alert() function and the
$p() function is similar but goes further in that it attempts
to "pretty print" the structure of whatever you pass it
and also gives you type information. The
$c() function is an
alias for the
console.log() function and the
function opens a debug window and logs the message to it whilst not blocking
execution like the
alert() function does. If you need to find
out what a variable consists of then this is probably
the function you want (or the standard