Drawing a line at the center of the selected category band, on the X axis
HTML
<link rel="stylesheet" href="http://www.webdetails.pt/ctools/charts/lib/tipsy.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.19/require.min.js"></script>
<script src="//webdetails.github.io/ccc/charts/lib/amd/require.config.js"></script>
<script src="//webdetails.github.io/ccc/charts/lib/q01-01.js"></script>
<div id="cccExample" />
JavaScript
require([
"ccc/pvc",
"ccc/def",
"ccc/protovis"
], function(pvc, def, pv) {
var selectedCateg = "2011-07-03";
new pvc.BarChart({
canvas: "cccExample",
width: 700,
height: 400,
axisGrid: true,
// orthoAxisOffset: 0.05,
extensionPoints: {
plot_add: function() {
// Shadow Panel
return new pv.Rule()
.left(function() {
var baseScale =
this.getContext().chart.axes.base.scale;
return baseScale(selectedCateg);
})
.top(0)
.bottom(0)
.height(null) // clear any inherited value
.width(null) // clear any inherited value
.fillStyle('gray');
}
}
})
.setData(relational_01, {crosstabMode: false })
.render();
});