Skip to content

Instantly share code, notes, and snippets.

View dgwyer's full-sized avatar
🏠
Working from home

David Gwyer dgwyer

🏠
Working from home
View GitHub Profile
@dgwyer
dgwyer / outline1.css
Last active December 31, 2018 23:18
Useful outline styles to help debug CSS without affecting layout.
* > * { outline: 1px rgba(255, 0, 0, 1) solid !important;}
* > * > * { outline: 1px rgba(255, 0, 0, 1) dashed !important;}
* > * > * > * { outline: 1px rgba(255, 0, 0, 1) dotted !important;}
* > * > * > * > * { outline: 1px rgba(255, 0, 0, 0.6) solid !important;}
* > * > * > * > * > * { outline: 1px rgba(255, 0, 0, 0.3) solid !important;}
@dgwyer
dgwyer / .block
Last active December 4, 2017 17:34
Example of nice() function
license: gpl-3.0
// Example usage
<XYFrame
margin={ { top: 20, bottom: 80, left: 70, right: 20 } }
size={[500,300]}
xAccessor={ d => d[0] }
yAccessor={ d => d[1] }
lines={ lines }
lineStyle={d => ({
stroke: "pink",
strokeWidth: 2
@dgwyer
dgwyer / .block
Last active October 13, 2017 16:16
Multi-line graph 3 with v4: Legend
license: mit
@dgwyer
dgwyer / .block
Last active October 12, 2017 08:33
Add series CSS class to scatter plot
license: gpl-3.0
@dgwyer
dgwyer / .block
Last active October 9, 2017 16:10
d3 scatterplot with tooltips
license: mit
<?php
/*
Plugin Name: Inline JS Test
Version: 0.1
Author: David Gwyer
*/
// ijst_ prefix is derived from [i]nline [js] [t]est
// Enqueue scripts
@dgwyer
dgwyer / .block
Created August 11, 2017 12:39
Isometric projection
license: mit
@dgwyer
dgwyer / .block
Created August 10, 2017 14:52
Custom Group Bar Chart
license: mit
@dgwyer
dgwyer / .block
Created August 10, 2017 14:41
Grouped Bar Chart
license: gpl-3.0