Skip to content

Instantly share code, notes, and snippets.

View theWhiteFox's full-sized avatar
👑
Crafting Web Apps - Continuous Learning

Stephen ♔ Ó Conchubhair theWhiteFox

👑
Crafting Web Apps - Continuous Learning
View GitHub Profile
@theWhiteFox
theWhiteFox / chart.js
Created May 2, 2017 10:20 — forked from chrtze/chart.js
Line Chart Example
var Chart = (function(window,d3) {
var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator;
var breakPoint = 768;
d3.csv('data.csv', init); //load data, then initialize chart
//called once the data is loaded
function init(csv) {
const ACTIVITIES = [
{name: 'side-project', time: 10, xp: 12},
{name: 'algorithms', time: 3, xp: 7},
{name: 'networking', time: 1, xp: 0.5},
{name: 'exercise', time: 2, xp: 1.5},
{name: 'systems design', time: 4, xp: 4},
{name: 'making CSS codepens', time: 3, xp: 4}
];
/**
@theWhiteFox
theWhiteFox / colores.js
Created November 2, 2016 11:46 — forked from aaizemberg/colores.js
categorical colors
// colores usados por Google en sus graficos, trends, etc.
//
function colores_google(n) {
var colores_g = ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262", "#5574a6", "#3b3eac"];
return colores_g[n % colores_g.length];
}
//
//
var c10 = d3.scale.category10();
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb: