mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-15 01:35:54 -07:00
dirty commit: can't get references to work correctly between any tables
This commit is contained in:
parent
e1f0b78236
commit
a4fddbeced
183 changed files with 5461 additions and 5 deletions
46
app/presenters/dashboard/background_presenter.rb
Normal file
46
app/presenters/dashboard/background_presenter.rb
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
module Dashboard
|
||||
class BackgroundPresenter
|
||||
include AnalyzeHelper
|
||||
attr_reader :num_of_columns
|
||||
|
||||
def initialize(num_of_columns:)
|
||||
@num_of_columns = num_of_columns
|
||||
end
|
||||
|
||||
def zone_label_x
|
||||
2
|
||||
end
|
||||
|
||||
def benchmark_y
|
||||
(analyze_zone_height * 2) - (benchmark_height / 2.0)
|
||||
end
|
||||
|
||||
def benchmark_height
|
||||
1
|
||||
end
|
||||
|
||||
def grouped_chart_column_width
|
||||
graph_width / data_sources
|
||||
end
|
||||
|
||||
def column_end_x(position)
|
||||
zone_label_width + (grouped_chart_column_width * position)
|
||||
end
|
||||
|
||||
def column_start_x(position)
|
||||
column_end_x(position - 1)
|
||||
end
|
||||
|
||||
def bar_label_height
|
||||
(100 - ((100 - analyze_graph_height) / 2))
|
||||
end
|
||||
|
||||
def zone_label_y(position)
|
||||
8.5 * (position + position - 1)
|
||||
end
|
||||
|
||||
def data_sources
|
||||
num_of_columns
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue