mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-16 06:05:29 +01:00
* updates the pie charts to truncate the labels. Long labels causes the pie chart to become very small * updates the 12 month chart so that the current month includes the averages from the past 2 months git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@666 a4c988fc-2ded-0310-b66e-134b36920a42
16 lines
No EOL
768 B
Text
Executable file
16 lines
No EOL
768 B
Text
Executable file
&title=Spread of running actions for visible contexts,{font-size:16}&
|
|
&pie=60,#505050,#000000,true,1&
|
|
&x_axis_steps=1& &y_ticks=5,10,5& &line=3,#87421F& &y_min=0& &y_max=20&
|
|
&values=<%
|
|
0.upto @actions_per_context.size()-2 do | i |
|
|
%><%=@actions_per_context[i]['total'].to_i*100/@sum%>,<%
|
|
end
|
|
-%><%=@actions_per_context[@actions_per_context.size()-1]['total'].to_i*100/@sum%>&
|
|
&pie_labels=<%
|
|
0.upto @actions_per_context.size()-2 do | i |
|
|
%><%=truncate(@actions_per_context[i]['name'],@truncate_chars, '...')%>,<%
|
|
end
|
|
-%><%=truncate(@actions_per_context[@actions_per_context.size()-1]['name'],@truncate_chars,'...') %>&
|
|
&colours=#d01f3c,#356aa0,#C79810,#c61fd0,#1fc6d0,#1fd076,#72d01f,#c6d01f,#d0941f&
|
|
&tool_tip=#x_label#: #val#%25&
|
|
&x_label_style=9,,2,1& |