diff --git a/app/views/graphs/issue_status_flow.html.erb b/app/views/graphs/issue_status_flow.html.erb index 792a4d2..b4a8996 100644 --- a/app/views/graphs/issue_status_flow.html.erb +++ b/app/views/graphs/issue_status_flow.html.erb @@ -13,22 +13,23 @@ %> - + <% @status_changes.each do |status_change| %> <% changes_count = [status_change["changes_count"].to_i,40].min + old_status = status_change["old_status"].to_i + new_status = status_change["new_status"].to_i - x1 = points[status_change["old_status"].to_i]["x"] - y1 = points[status_change["old_status"].to_i]["y"] + x1 = points[old_status]["x"] + y1 = points[old_status]["y"] - x2 = points[status_change["new_status"].to_i]["x"] - y2 = points[status_change["new_status"].to_i]["y"] + x2 = points[new_status]["x"] + y2 = points[new_status]["y"] 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 @@ -36,6 +37,7 @@ %> " /> <% end %>