Skip to content

Instantly share code, notes, and snippets.

View EightBitBoy's full-sized avatar
🤷‍♂️
It kind of works!

Stefan Härtel EightBitBoy

🤷‍♂️
It kind of works!
View GitHub Profile
@EightBitBoy
EightBitBoy / app.js
Created April 16, 2012 10:50
Chart gradient
var namespace = (function(){
function setUp(){
// generate some test data
var chartData = [];
var numDataPoints = 100;
var dataMax = 10;
var PI = 3.14;
for(var i = 0; i < numDataPoints; i++){
chartData.push(Math.sin(i * (PI/numDataPoints)) * dataMax);
}