<% if mode == :table %>
<%= link_to "Chart", current_page_path(search: { **search_params, mode: "chart" }) %>
<% else %>
<%= link_to "Table", current_page_path(search: { **search_params, mode: "table" }) %>
<% end %>
<% if dataframe.empty? %>
No results found. Try modifying your search or expanding your time range.
<% elsif mode == :chart && x_axis.present? %>
<% else %>
<% dataframe.types.keys.each do |column| %>
<%= tag.th(column.to_s.titleize, class: ("col-expand" if column == dataframe.types.keys.last)) %>
<% end %>
<% dataframe.each_row do |row| %>
<% dataframe.types.keys.each do |column| %>
|
<%= row[column] %>
|
<% end %>
<% end %>
<% end %>