Skip to content

Instantly share code, notes, and snippets.

Avatar

timproDev timproDev

  • Brooklyn, NY
View GitHub Profile
@timproDev
timproDev / app.css
Created Jun 22, 2018
Wordy Worderson
View app.css
@media only screen and (min-width: 641px) {
body, html {
overflow-x: hidden; } }
@media only screen and (max-width: 40em) {
html {
-webkit-text-size-adjust: 100%; } }
body {
-webkit-font-smoothing: antialiased;
@timproDev
timproDev / app.css
Created May 11, 2018
Music Chart Ring V1
View app.css
/**
* Foundation for Sites by ZURB
* Version 6.4.3
* foundation.zurb.com
* Licensed under MIT Open Source
*/
/* Global Styles and resets */
@media only screen and (min-width: 641px) {
body, html {
@timproDev
timproDev / app.css
Last active Apr 6, 2018
Radial Barchart aka the Seashell
View app.css
@media only screen and (min-width: 641px) {
body, html {
overflow-x: hidden; } }
@media only screen and (max-width: 40em) {
html {
-webkit-text-size-adjust: 100%; } }
body {
-webkit-font-smoothing: antialiased;
@timproDev
timproDev / app.css
Last active Apr 4, 2018
Multi Line with Hover
View app.css
line {
shape-rendering: crispEdges; }
.aboveLabelTickText {
font-family: 'Raleway', sans-serif;
font-size: 1rem;
fill: #404040; }
.barLabel {
font-family: 'Raleway', sans-serif;
View donut-chart-single-init.js
document.addEventListener("DOMContentLoaded", function(){
// set global variables
var path = '';
var dataFile = ['placeholder-dataset.csv','placeholder-two.csv'];
var dataFileTwo = 'placeholder-two.csv';
var elemContainer = ['#donutChart', '#donutChartTwo', '#donutChartThree','#donutChartFour'];
var uiEl = '.chart-ui-container input';
var cssFile = 'donut-chart-single.css';
var strNumHeaders = ['header_two_amount','header_three_amount']; // to convert to numbers
@timproDev
timproDev / donut-chart-init.js
Last active Mar 5, 2018
Donut Chart with Radio Buttons
View donut-chart-init.js
document.addEventListener("DOMContentLoaded", function(){
// set global variables
var path = '';
var dataFile = 'placeholder-dataset.csv';
var dataFileTwo = 'placeholder-two.csv';
var elemContainer = ['#donutChart', '#donutChartTwo'];
var uiEl = '.chart-ui-container input';
var cssFile = 'donut-chart.css';
var strNumHeaders = ['header_two_amount','header_three_amount']; // to convert to numbers
@timproDev
timproDev / d3-presentation-init.js
Last active Feb 28, 2018
Simple Barchart for Presentation
View d3-presentation-init.js
document.addEventListener("DOMContentLoaded", function(){
var options = {
window: window,
path:"",
css: "d3-presentation.css",
js: "d3-presentation.js",
dataFile: "nat-cat.csv",
element: document.querySelector("#presBarchart"),
functionName: "presBarchart",
View index.html
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Timmy's Pareto Chart!</title>
<!-- css dynamically injected -->
</head>
<body>
@timproDev
timproDev / horiz-barchart-init.js
Last active Jan 31, 2018
Updated Barchart - Reusable Pattern
View horiz-barchart-init.js
document.addEventListener("DOMContentLoaded", function(){
var options = {
window: window,
path:"",
css: "horiz-barchart.css",
js: "horizBarchart.js",
dataFile: "nat-cat.csv",
element: document.querySelector("#horizBarchart"),
functionName: "horizBarchart",
@timproDev
timproDev / d3-config.js
Last active Jan 26, 2018
Bubble Scale with centered labels
View d3-config.js
var d3Config = d3Config || {};
d3Config.init = function(settings) {
console.log("Configing!!");
d3Config.linkStyle(settings);
if (typeof settings.win.d3 === "undefined") {
console.log("lib undefined");
d3Config.loadLib(settings);
}
if (typeof settings.win.d3 !== "undefined") {
console.log("lib defined");