Class: RailsuiCharts::DemoController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/railsui_charts/demo_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/railsui_charts/demo_controller.rb', line 7

def index
  @monthly_revenue = [
    { x: "Jan", y: 32_000 },
    { x: "Feb", y: 35_000 },
    { x: "Mar", y: 42_000 },
    { x: "Apr", y: 38_000 },
    { x: "May", y: 48_290 },
    { x: "Jun", y: 52_000 }
  ]

  @daily_signups = [12, 19, 15, 25, 22, 30, 28]
  @plan_distribution = [
    { x: "Starter", y: 120 },
    { x: "Pro", y: 85 },
    { x: "Enterprise", y: 32 }
  ]

  @page_views = [120, 132, 101, 134, 190, 230, 210, 180, 250, 280]
end