ajax Draw Graphs with JSON Data Previous postdealt with sending JSON data around. Now, I need to be able to draw it. After looking for graphing libraries, I've settled on Chart.js and on CanvasJS. Common steps All graphs need a canvas element to function: <div id="chartContainer" style="height:
django Send JSON Graph Data from Django I'm trying to write a Django application to deal with my finances. I've got a nice page listing various transactions, but I thought it'd be nice to have a graph too, to see where I actually am on the spot. To do this, I&
disable Ignore ESLint Directives in Code The other day I've had to refactor a piece of angular code. Unfortunately, the original code was written a long time ago and has some issues like having $scope in controllers and a rather large number of unused variables. changing the $scope to this is a very time-consuming
awesome Load FontAwesome Fonts with Webpack 2 TL;DR:: Add the (s)css dependency to your main (s)css file and specify where to find the fonts too. Then use the proper loaders in your webpack.config.js file. The past few days I had trouble loading the font-awesome fonts with webpack. I tried quite a few
custom Change Packages Paths in NodeJS TL;DR: Edit %appdata%\npm\etc\npmrc and add prefix and cache entries to specify the locations where node puts packages. Every time I install a new framework/dev environment I have to look where they put files. Having a roaming profile is a pain and I need to make
debug Debug Javascript - Some Methods These days I'm trying to tweak a 3rd-party framework and I'm missing stuff sometimes (e.g. injected data). Below are some methods I've found useful when debugging the script. * console.log - print all things * Object inspection - see your object's content
debug Debug Javascript - Object Inspection Many times, you have objects where you may or may not know their content. If you're running in the browser, life is easy as you can pause the code and inspect the object. at command line is a bit more annoying. In this case, at least for the
debug Debug Javascript - console.log This is the holy grail of debugging for me. It's old school, simple and effective. It works both in browser and from command line. My code looks like: console.log("Environment path: " + envPath); You can make it fancier with debug levels (in if() statements or with
browser Drawing QR-Code on Browser in Javascript In my quest to make the pages of one site a bit more mobile-friendly, I've got the idea to provide a QR-Code for an unique identifier generated for users. This is part of a wizard and the end-product is: QR Code in JavaScript To reach this outcome, I&
clipboard Copy Text to Clipboard in HTML Page using JavaScript I've got a problem on one of my sites: I have a unique identifier displayed on one page, which I need to make it easy After looking online, I've found three approaches using only JS. Clipboard.js Clipboard.js is a new (September 2015) approach which