Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @series = []
- # Amount of points of data to get and generate in the chart
- data_amount = 30
- # 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)
- end_date = Date.today.end_of_month - 2.month
- # Iterating on each chart type
- chart_types.each do |chart_type|
- @series << { name: chart_type.to_s, data: Currency.data_by_type(chart_type, end_date, data_amount) }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement