Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var circle = this.vis.select("svg").selectAll("circle")
- .data(this.points, function(d) { return d; });
- circle.enter().append("circle")
- .attr("class", function(d) { return d === self.selected ? "selected" : null; })
- .attr("cx", function(d) { return self.x(d.x); })
- .attr("cy", function(d) { return self.y(d.y); })
- .attr("r", 10.0)
- .style("cursor", "ns-resize")
- .on("mousedown.drag", self.datapoint_drag())
- .on("touchstart.drag", self.datapoint_drag());
- circle
- .attr("class", function(d) { return d === self.selected ? "selected" : null; })
- .attr("cx", function(d) {
- return self.x(d.x); })
- .attr("cy", function(d) { return self.y(d.y); });
- circle.exit().remove();
- hr_circles = self.graph_gps.svg.selectAll("hr_circles")
- .data(self.graph_gps.datay1); // , function(d){return d;}
- hr_circles.enter().append("circle")
- .style("z-index", 3)
- .attr("class", "y1")
- .attr("r", 1)
- .attr("cx", function (d, i) {
- return xScale(d.time)
- })
- .attr("cy", function (d, i) {
- return yScale(d.vy)
- })
- .on("mouseover",
- function (d) {...displays a tooltip...})
- .on("mouseout", function (d) {
- });
- hr_circles.attr("class", "y1")
- .attr("cx", function (d, i) {
- return xScale(d.time)
- })
- .attr("cy", function (d, i) {
- return yScale(d.vy)
- })
- hr_circles.exit().remove();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement