Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @series = []
  2. # Amount of points of data to get and generate in the chart
  3. data_amount = 30
  4. # The final data to get the data from (Using 2 months before the current month because the nasdaq api only has data from this period)
  5. end_date = Date.today.end_of_month - 2.month
  6. # Iterating on each chart type
  7. chart_types.each do |chart_type|
  8. @series << { name: chart_type.to_s, data: Currency.data_by_type(chart_type, end_date, data_amount) }
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement