Commit 0ec2bcc6 authored by Masayuki Tanaka's avatar Masayuki Tanaka Committed by masayuki

Fix trivial

parent ce214de3
...@@ -484,6 +484,13 @@ ...@@ -484,6 +484,13 @@
function classCircle (d,i) { return classShape(d,i) + " __circle __circle-" + i } function classCircle (d,i) { return classShape(d,i) + " __circle __circle-" + i }
function classBar (d,i) { return classShape(d,i) + " __bar __bar-" + i } function classBar (d,i) { return classShape(d,i) + " __bar __bar-" + i }
function xx (d) {
return x(d.x)
}
function yv (d) {
return y(d.value)
}
//-- Circle --/ //-- Circle --/
function circleX (d) { function circleX (d) {
...@@ -784,8 +791,8 @@ ...@@ -784,8 +791,8 @@
.attr("class", function(d){ return "ygrid-line " + d['class'] }) .attr("class", function(d){ return "ygrid-line " + d['class'] })
.attr("x1", 0) .attr("x1", 0)
.attr("x2", width) .attr("x2", width)
.attr("y1", function(d){ return y(d.value) }) .attr("y1", yv)
.attr("y2", function(d){ return y(d.value) }) .attr("y2", yv)
} }
// Area // Area
...@@ -862,8 +869,8 @@ ...@@ -862,8 +869,8 @@
main.selectAll('line.xgrid-focus') main.selectAll('line.xgrid-focus')
.style("visibility","visible") .style("visibility","visible")
.data([selectedData[0]]) .data([selectedData[0]])
.attr(__axis_rotated ? 'y1' : 'x1', function(d){ return x(d.x) }) .attr(__axis_rotated ? 'y1' : 'x1', xx)
.attr(__axis_rotated ? 'y2' : 'x2', function(d){ return x(d.x) }) .attr(__axis_rotated ? 'y2' : 'x2', xx)
// Set tooltip // Set tooltip
tooltip.style("top", (d3.mouse(this)[1] + 30) + "px") tooltip.style("top", (d3.mouse(this)[1] + 30) + "px")
...@@ -1153,8 +1160,8 @@ ...@@ -1153,8 +1160,8 @@
} }
if (withY && __grid_y_lines) { if (withY && __grid_y_lines) {
main.select('.ygrid-lines').selectAll('.ygrid-line') main.select('.ygrid-lines').selectAll('.ygrid-line')
.attr("y1", function(d){ return y(d.value) }) .attr("y1", yv)
.attr("y2", function(d){ return y(d.value) }) .attr("y2", yv)
} }
// bars // bars
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment