Skip to content

Instantly share code, notes, and snippets.

@ndarville ndarville/
Last active Aug 29, 2015

What would you like to do?
Løkke vs. Vestager
<!DOCTYPE html>
<meta charset="utf-8">
.chart div {
font: 10px sans-serif;
background-color: steelblue;
text-align: right;
padding: 3px;
margin: 1px;
color: white;
<script src=""></script>
<div class="chart"></div>
var data = [2000, 160000];
var format = d3.formatPrefix(d3.max(data));
var x = d3.scale.linear()
.domain([0, d3.max(data)])
.range([0, 800]);".chart")
.style("width", function(d) { return x(d) + "px"; })
.text(function(d) {
return format.scale(d) + format.symbol;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.