this is for holding javascript data
Adrian Price-Whelan working labels because, bitch please, sleep?
over 10 years ago
Commit id: 7eea417af95c32774424d05ef96993b9fbac7f41
deletions | additions
diff --git a/css/style.css b/css/style.css
index f00c995..91afb07 100644
--- a/css/style.css
+++ b/css/style.css
...
}
svg {
font:
15px 12pt sans-serif;
font-family:
"Telex"; "Source Sans Pro";
font-weight:
200; 100;
padding: 10px;
background: #f7f5f0;
margin: 0 auto;
...
border-radius: 8px;
}
.axis-label {
font-weight: 300;
font-size: 18pt;
}
.axis,
.frame {
shape-rendering: crispEdges;
...
#caption{
word-wrap: normal;
font:
18px 20px sans-serif;
font-family:
"Telex"; "Source Sans Pro";
width: 60%;
margin: 0 auto;
}
diff --git a/panel_test.html b/panel_test.html
index 33f73c0..579a805 100644
--- a/panel_test.html
+++ b/panel_test.html
...
href='http://fonts.googleapis.com/css?family=Telex:200,300,400,700'
href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300,400,700' rel='stylesheet' type='text/css'>
...
csv_data,
plot_size = 300; // px
var figPadding = {"top" : 0, "left" :
20, 40, "right" : 20, "bottom" :
20}, 35},
plotSpacing = {"vertical" : 40, "horizontal" :
40}; 60};
// Scalers for x / y axes from data space to pixel space
var xScaler = d3.scale.linear()
...
d3.select(this).call(yAxis);
});
// add axis labels
svg.selectAll(".x-label")
.data(d)
.enter().append("text")
.text(function(d,i) { return d.xColumnName; })
.attr("class", "axis-label")
.attr("x", function(d, i) { return x_translate(d.j) + plot_size/2. - $(this).width()/2.; })
.attr("y", function(d, i) { return (plot_size-plotSpacing['vertical']/2-y_translate(d.i)+50); });
svg.selectAll(".y-label")
.data(d)
.enter().append("text")
.text(function(d,i) { return d.yColumnName; })
.attr("class", "axis-label")
.attr("x", function(d, i) { return x_translate(d.j)-15; })
.attr("y", function(d, i) { return (plotSpacing['vertical']/2-y_translate(d.i)) + plot_size/2. + $(this).width()/2.-10; })
.attr("transform", function (d,i) { return "rotate(-90," + $(this).attr('x') + "," + $(this).attr('y') + ")"; });
// If state has a 'selection':
state['plots'].forEach(function(p,i) {
if (typeof p['selection'] != 'undefined') {