mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-16 01:06:32 +01:00
Extract pie chart data logic into model layer
Move most of the tests for this logic into the unit test layer.
This commit is contained in:
parent
9f3470f9dc
commit
961227da0c
5 changed files with 142 additions and 164 deletions
|
|
@ -1,9 +1,9 @@
|
|||
&title=<%= @title %>,{font-size:16}&
|
||||
&pie=<%= @alpha %>,#505050,{font-size: 12px; color: #404040;}&
|
||||
&title=<%= @data.title %>,{font-size:16}&
|
||||
&pie=<%= @data.alpha %>,#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(",") %>&
|
||||
&values=<%= @data.values.join(",") %>&
|
||||
&pie_labels=<%= @data.labels.join(",") %>&
|
||||
&links=<%= @data.ids.map{|id| context_path(id)}.join(",") %>&
|
||||
&colours=#d01f3c,#356aa0,#C79810,#c61fd0,#1fc6d0,#1fd076,#72d01f,#c6d01f,#d0941f,#40941f&
|
||||
&tool_tip=#x_label#: #val#%25&
|
||||
&x_label_style=9,,2,1&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue