Skip to content

Instantly share code, notes, and snippets.

View ninjaPixel's full-sized avatar

Matt Michel ninjaPixel

View GitHub Profile
@ninjaPixel
ninjaPixel / README.md
Last active November 19, 2015 17:13
Grouped Bar Chart

This grouped bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:

var gulp = require('gulp'),
less = require('gulp-less'),
path = require('path'),
jade = require('gulp-jade'),
livereload = require('gulp-livereload');
var MY_LOCALS = {errLogToConsole: true};
gulp.task('default', function() {
// place code for your default task here
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:22
Treemap
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Treemap</title>
</head>
<style>
.d3-tip {
line-height: 1;
padding: 8px;
background: rgba(100, 100, 100, 0.7);
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:13
Pie / Donut
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Donut Chart</title>
</head>
<style>
path {
stroke-width: 5px;
}
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:13
Histogram
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Histogram</title>
</head>
<style>
.ninja-axis path,
.ninja-axis line {
fill: none;
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:12
BarChart
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Bar Chart</title>
</head>
<style>
.ninja-axis path,
.ninja-axis line {
fill: none;
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:12
BubbleChart
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Bubble Chart</title>
</head>
<style>
.ninja-axis path,
.ninja-axis line {
fill: none;
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:12
LineChart
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Line Chart</title>
</head>
<style>
.ninja-axis path,
.ninja-axis line {
fill: none;
@ninjaPixel
ninjaPixel / index.html
Last active August 29, 2015 14:12
A simple example of using a basic chart created within the ninjaPixel.js framework
<!DOCTYPE HTML>
<html>
<head>
<title>ninjaPixel.js Bar Chart</title>
</head>
<style>
.ninja-axis path,
.ninja-axis line {
fill: none;
@ninjaPixel
ninjaPixel / _.md
Last active August 29, 2015 14:08
very simple browser test