|
|
|
@ -28,27 +28,41 @@
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<% if gauge.key_benchmark_percentage.present? %>
|
|
|
|
|
|
|
|
<line
|
|
|
|
<line
|
|
|
|
class="zone-benchmark stroke-black"
|
|
|
|
class="zone-benchmark stroke-gray-2"
|
|
|
|
x1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.key_benchmark_percentage)).x %>"
|
|
|
|
x1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.watch_low_legend)).x %>"
|
|
|
|
y1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.key_benchmark_percentage)).y %>"
|
|
|
|
y1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.watch_low_legend)).y %>"
|
|
|
|
x2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.key_benchmark_percentage)).x %>"
|
|
|
|
x2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.watch_low_legend)).x %>"
|
|
|
|
y2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.key_benchmark_percentage)).y %>"
|
|
|
|
y2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.watch_low_legend)).y %>"
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<path
|
|
|
|
<line
|
|
|
|
class="key-benchmark-indicator fill-black"
|
|
|
|
class="zone-benchmark stroke-gray-2"
|
|
|
|
d="<%= move_to(point: indicator_tip) %>
|
|
|
|
x1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.growth_low_legend)).x %>"
|
|
|
|
<%= draw_line_to(point: indicator_right_corner) %>
|
|
|
|
y1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.growth_low_legend)).y %>"
|
|
|
|
<%= draw_line_to(point: indicator_left_corner) %>
|
|
|
|
x2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.growth_low_legend)).x %>"
|
|
|
|
<%= draw_line_to(point: indicator_tip) %>"
|
|
|
|
y2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.growth_low_legend)).y %>"
|
|
|
|
transform="rotate(<%= rotation_angle_for(percentage: gauge.key_benchmark_percentage) %> <%= arc_center.x %> <%= arc_center.y %>)"
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
stroke="none"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<line
|
|
|
|
|
|
|
|
class="zone-benchmark stroke-gray-2"
|
|
|
|
|
|
|
|
x1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.ideal_low_legend)).x %>"
|
|
|
|
|
|
|
|
y1="<%= benchmark_line_point(outer_radius, angle_for(percentage: gauge.ideal_low_legend)).y %>"
|
|
|
|
|
|
|
|
x2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.ideal_low_legend)).x %>"
|
|
|
|
|
|
|
|
y2="<%= benchmark_line_point(inner_radius, angle_for(percentage: gauge.ideal_low_legend)).y %>"
|
|
|
|
|
|
|
|
stroke-width="<%= stroke_width %>"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<% if gauge.key_benchmark_percentage.present? %>
|
|
|
|
|
|
|
|
<line
|
|
|
|
|
|
|
|
class="zone-benchmark stroke-black"
|
|
|
|
|
|
|
|
x1="<%= benchmark_line_point(outer_radius + 5, angle_for(percentage: gauge.key_benchmark_percentage)).x %>"
|
|
|
|
|
|
|
|
y1="<%= benchmark_line_point(outer_radius + 5, angle_for(percentage: gauge.key_benchmark_percentage)).y %>"
|
|
|
|
|
|
|
|
x2="<%= benchmark_line_point(inner_radius - 5 , angle_for(percentage: gauge.key_benchmark_percentage)).x %>"
|
|
|
|
|
|
|
|
y2="<%= benchmark_line_point(inner_radius - 5, angle_for(percentage: gauge.key_benchmark_percentage)).y %>"
|
|
|
|
|
|
|
|
stroke-width="<%= stroke_width + 2 %>"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="gauge-title <%= font_class %> fill-black"><%= gauge.title %></span>
|
|
|
|
<span class="gauge-title <%= font_class %> fill-black"><%= gauge.title %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|