mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 19:20:13 +01:00
15 lines
No EOL
844 B
Text
Executable file
15 lines
No EOL
844 B
Text
Executable file
<%
|
|
size = @actions_per_context.size()
|
|
pie_slices = Array.new(size){|i| @actions_per_context[i]['total'].to_i*100/@sum }
|
|
pie_labels = Array.new(size){|i| truncate(@actions_per_context[i]['name'], :length => @truncate_chars, :omission => '...') }
|
|
pie_links = Array.new(size){|i| url_for :controller => "contexts", :action => "show", :id=>@actions_per_context[i]['id']}
|
|
-%>
|
|
&title=<%= t('stats.spread_of_actions_for_all_context') %>,{font-size:16}&
|
|
&pie=70,#505050,{font-size: 12px; color: #404040;}&
|
|
&x_axis_steps=1& &y_ticks=5,10,5& &line=3,#87421F& &y_min=0& &y_max=20&
|
|
&values=<%= pie_slices.join(",") %>&
|
|
&pie_labels=<%= pie_labels.join(",") %>&
|
|
&links=<%= pie_links.join(",") %>&
|
|
&colours=#d01f3c,#356aa0,#C79810,#c61fd0,#1fc6d0,#1fd076,#72d01f,#c6d01f,#d0941f,#40941f&
|
|
&tool_tip=#x_label#: #val#%25&
|
|
&x_label_style=9,,2,1& |