diff --git a/app/views/graphs/issue_status_flow.html.erb b/app/views/graphs/issue_status_flow.html.erb index de4966c..792a4d2 100644 --- a/app/views/graphs/issue_status_flow.html.erb +++ b/app/views/graphs/issue_status_flow.html.erb @@ -13,10 +13,10 @@ %> - + <% @status_changes.each do |status_change| %> <% - changes_count = status_change["changes_count"].to_i + changes_count = [status_change["changes_count"].to_i,40].min x1 = points[status_change["old_status"].to_i]["x"] y1 = points[status_change["old_status"].to_i]["y"] @@ -24,10 +24,15 @@ x2 = points[status_change["new_status"].to_i]["x"] y2 = points[status_change["new_status"].to_i]["y"] - x1a = x1 # f(changes_count) - y1a = y1 # f(changes_count) - x1b = x1 # f(changes_count) - y1b = y1 # f(changes_count) + atan2 = -Math.atan2(y1-y2,x1-x2) + xdiff = Math.sin(atan2)*changes_count + ydiff = Math.cos(atan2)*changes_count + + + x1a = x1 + xdiff + y1a = y1 + ydiff + x1b = x1 - xdiff + y1b = y1 - ydiff %>