Monthly Archives: May 2014

Export Dygraph To PNG

Dygraphs is a fast and easy-to-use JavaScript charting library. Check out lines 22-35 below to see just how easy it is to make a chart with Dygraphs. If you want to export your charts as images for whatever reason you can grab the handy JavaScript file over at http://cavorite.com/labs/js/dygraphs-export/

Don’t Be That Guy

Hey fellow party goer…I see that you are having a good time at this party that we are both at…let me take you away from enjoying this party so you can watch something on my smartphone…I call it my “tiny television”…the video is five minutes long…the volume is inadequate for you to hear the audio.

From Canvas to PDF via AJAX

If you are ever in the peculiar position of having to convert a canvas tag into an image, post it via AJAX to a CFC and then generate a PDF then I have your solution.

The first file below is the HTML and JavaScript needed to generate a canvas image, convert it to a JavaScript image and ship it to CFC Land via AJAX. The second file is the first (non-functional) version of the CFC. The third file is the working version of the CFC. Hit me with a comment if you have any questions or have a more concise (or different) way of solving this problem. I also shared this problem…and the answer over at Stack Exchange.

UPDATE: Scroll down to the bottom of the code for a bonus SVG-to-Canvas-to-PNG conversion.

Bonus Code: SVG-to-Canvas-to-PNG!

Hacky Zurb Foundation 4 Checkbox Fixer

After screwing around with Zurb Foundation 4 for a time I have to say that it is not without it’s quirks. One of them is not being able to consistently write to a checkbox. Here is my hacky work-around. Pardon the ‘this’ scope…this method is part of a utility object that I created in an effort to handle all of Foundation 4’s quirks in one place. The benefit of delegating responsibility in this manner is that when/if I upgrade the code base to Foundation 5 (or perhaps Twitter Bootstrap) I will only have to change one object.

Supposedly this is fixed in Foundation 5.

This Is Happening

I picked up the Trollbloods Battlegroup from Huzzah Hobbies a while ago. I took my time to carefully remove the flash and mold lines, then did some pinning and assembly and now have everything primed. I’ve decided to do some of the painting before completing assembly. Next up: painting!

20140501-104736.jpg