Skip to content

Instantly share code, notes, and snippets.

@pbogden
pbogden / README.md
Last active January 29, 2017 14:58
IE problem

IE problem

Note: If you're not using IE, you're probably not seeing anything wrong. But if you're using IE, then the height of the SVG is 150px, no matter how many times you refresh the browser -- that's not cool.

With nice browsers, every time you refresh the page the SVG height adjusts to contain a line of circles that always fills the light gray box. Most modern browsers will set the SVG and container height according to the aspect ratio of the viewbox attribute, and the SVG will fill the width of the page.

But not IE (tested with IE 9, 10 & 11): IE sets the SVG height to 150px, regardless of the aspect ratio of the SVG. So the you'll probably see a random amount of empty gray space to the right of the circles every time you refresh. Click here for a solution to the IE problem.

@pbogden
pbogden / .gitignore
Last active December 16, 2015 22:48
osm vectors
data
tmp
@pbogden
pbogden / README.md
Last active December 17, 2015 01:26
Final - Part 2
@pbogden
pbogden / README.md
Last active December 17, 2015 00:33
Final - Part 1
@pbogden
pbogden / README.md
Last active March 10, 2017 01:12
legend

reusable legend

@pbogden
pbogden / README.md
Last active February 2, 2017 16:16
Reusable bar chart
@pbogden
pbogden / README.md
Last active April 23, 2018 19:41
responsive2

Side-by-side responsive graphics

The key is to use appropriate CSS for the containers...

  • display: inline-block; for side-by-side containers
  • vertical-align: top; so content aligns along the top (default is baseline of parent)
  • float: left; otherwise carriage-return between containers will take up space
  • width: 48%; must account for padding on left & right
@pbogden
pbogden / .gitignore
Last active November 26, 2015 00:58
traffic
data
segments
segments.json
@pbogden
pbogden / .gitignore
Last active March 11, 2017 21:35
counties1
gz
shp
@pbogden
pbogden / .gitignore
Last active November 19, 2015 00:46
hmda1
04c4acfe866676409ddb
todd