Class: Sentiero::Web::Views::ScrollView

Inherits:
AnalyzerView show all
Defined in:
lib/sentiero/web/views/scroll_view.rb

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

Methods inherited from AnalyzerView

#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

Constructor Details

This class inherits a constructor from Sentiero::Web::Views::AnalyzerView

Instance Method Details

#axis_yObject



16
# File 'lib/sentiero/web/views/scroll_view.rb', line 16

def axis_y = svg_height - 24

#bar_gapObject



15
# File 'lib/sentiero/web/views/scroll_view.rb', line 15

def bar_gap = 12

#bar_widthObject



18
# File 'lib/sentiero/web/views/scroll_view.rb', line 18

def bar_width = (svg_width - bar_gap * 5) / 4

#chart_topObject



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_pagesObject



11
# File 'lib/sentiero/web/views/scroll_view.rb', line 11

def sorted_pages = pages.sort_by { |url, page| [-page[:session_count], url] }

#svg_heightObject



14
# File 'lib/sentiero/web/views/scroll_view.rb', line 14

def svg_height = 140

#svg_widthObject



13
# File 'lib/sentiero/web/views/scroll_view.rb', line 13

def svg_width = 320

#templateObject



9
# File 'lib/sentiero/web/views/scroll_view.rb', line 9

def template = "analytics_scroll.html.erb"