I am working on a visualization project using D3. I want to implement four rules like this. I want the rules to aid reading values like in the demo. As I have four columns of time series in my current visualization project, I wish to have four of these rules and when my mouse moves, I wish the four rules can move together. What would be the simplest way to code this?
By looking at the source code of the demo I tried this with my code:
var context = cubism.context();
d3.select("body").append("div")
.attr("class", "rule")
.call(context.rule());
I can see this element in my html:
<div class="rule" style="display: inline;">
<div class="line" style="position: absolute; top: 0px; bottom: 0px; width: 1px; pointer-events: none; display: none;"></div>
</div>
However I see no rule showing up.
Moreover, according to its documentation, Cubism context deals with realtime data. I'm not visualizing realtime data in my project so I feel Cubism is an overkill here. Is there a simpler way to code four rules of similar style that move together?