Module: AppRail::Steps::Charts::Dashboard

Included in:
Displayable
Defined in:
lib/app_rail/steps/charts/dashboard.rb

Instance Method Summary collapse

Instance Method Details

#ar_charts_dashboard_bar_chart(id:, title:, values:) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/app_rail/steps/charts/dashboard.rb', line 27

def ar_charts_dashboard_bar_chart(id:, title:, values:)
  {
    id: id.to_s,
    chartType: :bar,
    title: title,
    chartValues: values
  }.compact
end

#ar_charts_dashboard_line_chart(id:, title:, values:, text: nil, footer: nil) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/app_rail/steps/charts/dashboard.rb', line 16

def ar_charts_dashboard_line_chart(id:, title:, values:, text: nil, footer: nil)
  {
    id: id.to_s,
    chartType: :line,
    title: title,
    text: text,
    footer: footer,
    chartValues: values
  }.compact
end

#ar_charts_dashboard_pie_chart(id:, title:, values:, light_colors: nil, dark_colors: nil) ⇒ Object



36
37
38
39
40
41
42
43
44
45
# File 'lib/app_rail/steps/charts/dashboard.rb', line 36

def ar_charts_dashboard_pie_chart(id:, title:, values:, light_colors: nil, dark_colors: nil)
  {
    id: id.to_s,
    chartType: :pie,
    title: title,
    chartValues: values,
    chartColors: light_colors,
    chartColorsDark: dark_colors
  }.compact
end

#ar_charts_dashboard_statistic(id:, title:, text:) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/app_rail/steps/charts/dashboard.rb', line 7

def ar_charts_dashboard_statistic(id:, title:, text:)
  {
    id: id.to_s,
    chartType: :statistic,
    title: title,
    text: text
  }.compact
end