This tries to reproduce the jobs
example as described in the Reactive Vega article.
See also min 3:19 in the video.
It stops working as soon as you select Any
...a mistery: in fact a bug, issue #330, fixed in v.2.2.0 release.
Made search working after Parametrized examples have been made available!
xxxxxxxxxx
<html>
<head>
<title>Vega Experiment: jobs with filters</title>
<script src="https://vega.github.io/vega-editor/vendor/d3.min.js"></script>
<script src="https://vega.github.io/vega/vega.min.js"></script>
</head>
<body>
<div id="vis"></div>
<p>
<form>
<b>Job Title:</b>
<input type="text" id="textbox" placeholder="search" autocomplete="off">
<b>Gender:</b>
<input type="radio" name="gender" value="men">Men
<input type="radio" name="gender" value="women">Women
<input type="radio" name="gender" value="all" checked="checked">Any
</form>
</p>
</body>
<script type="text/javascript">
//vg.debug.enable = true;
// parse a spec and create a visualization view
function parse(spec) {
vg.parse.spec(spec, function(chart) { chart({el:"#vis"}).update(); });
}
parse("spec.json");
console.log("vega version: " + vg.version);
console.log("d3 version: " + d3.version);
</script>
</html>
Modified http://vega.github.io/vega-editor/vendor/d3.min.js to a secure url
Modified http://vega.github.io/vega/vega.min.js to a secure url
https://vega.github.io/vega-editor/vendor/d3.min.js
https://vega.github.io/vega/vega.min.js