Class: Sentiero::Web::Views::ScrollView
Constant Summary
Constants inherited
from BaseView
BaseView::TEMPLATES_DIR, BaseView::TEMPLATE_CACHE
Constants included
from Escaping
Escaping::HTML_UNSAFE_IN_SCRIPT, Escaping::HTML_UNSAFE_IN_SCRIPT_PATTERN
Instance Attribute Summary
Attributes inherited from AnalyzerView
#pages, #since, #until_str, #was_truncated
Attributes inherited from BaseView
#base_path, #csrf_token
Instance Method Summary
collapse
#initialize, #page_report_href
Methods inherited from BaseView
#built_asset, compiled_template, #escape_js, #h, #initialize, #range_pairs, #render, #render_layout, #render_partial, #render_session_row
Methods included from Formatting
#format_duration, #format_vital, #parse_browser, #parse_device
Methods included from Escaping
#escape_html, #escape_js_string, #escape_json
Instance Method Details
#axis_y ⇒ Object
16
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 16
def axis_y = svg_height - 24
|
#bar_gap ⇒ Object
15
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 15
def bar_gap = 12
|
#bar_width ⇒ Object
18
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 18
def bar_width = (svg_width - bar_gap * 5) / 4
|
#chart_top ⇒ Object
17
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 17
def chart_top = 12
|
#max_count(dist) ⇒ Object
19
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 19
def max_count(dist) = [dist.values.max, 1].max
|
#sorted_pages ⇒ Object
11
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 11
def sorted_pages = pages.sort_by { |url, page| [-page[:session_count], url] }
|
#svg_height ⇒ Object
14
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 14
def svg_height = 140
|
#svg_width ⇒ Object
13
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 13
def svg_width = 320
|
#template ⇒ Object
9
|
# File 'lib/sentiero/web/views/scroll_view.rb', line 9
def template = "analytics_scroll.html.erb"
|