Using the barley.json example from the vega package, I wanted to try to add plots with x as
Please do not replicate, since I'm guessing I'm performing this ugly hack instead of the more elegant preferred method that I have overlooked. New projects are like puzzles, and I'm still a long way from completing this one.
xxxxxxxxxx
<html>
<head>
<title>Vega Examples</title>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="vega.js"></script>
<style>
* { font-family: Helvetica Neue, Arial, sans-serif; font-size: 14px; }
#ctrl { margin-bottom: 1em; }
</style>
</head>
<body>
<h3>Yield Compared to Site Average</h3>
<div id="vis" class="vis"></div>
<script type="text/javascript">
function parse(spec) {
vg.parse.spec(spec, function(chart) {
var view = chart({ el:"#vis" });
view.viewport(null)
.renderer("svg")
.update();
});
}
parse("barley_formula_total.json");
</script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js