<% content_for :javascripts do %> <%= javascript_include_tag "https://www.google.com/jsapi" %> <% end %>
<%= form_tag charts_events_path, method: :get, id: "chart-form" do %>
<%= select_tag :owner_type, options_for_select([["Owner", nil]] + available_owner_types, selected: params[:owner_type]), onchange: "submit();", class: "form-control" %>
<%= select_tag :event, options_for_select([["Event", nil]] + available_events, selected: params[:event]), onchange: "submit();", class: "form-control" %>
<%= select_tag :event_source, options_for_select([["Event Source", nil]] + available_event_sources, selected: params[:event_source]), onchange: "submit();", class: "form-control" %>
<%= select_tag :time_interval, options_for_select([["Time Interval", nil], ["yearly", "year"], ["monthly", "month"], ["weekly", "week"]], selected: params[:time_interval]), onchange: "submit();", class: "form-control" %>
<% end %>
<%= render_chart(@chart, 'chart') %>