The JSXGraph site offers a large "zoo" of examples with source code that is free to use, re-use and modify. These examples provide an entry point into learning the syntax and ultimately to developing entire figures of your own.
As you can see, I'm a big fan. If any of you out there are authoring on-line versions of open-source texts, I'd be happy to help you get JSXGraph up and running on your book. To see its use in an active on-line, open-source text, visit Guichard's Calculus text. Most of the figures in that version of the text are done in JSXGraph. One of my personal favorites is the one that illustrates Newton's Method.