<%=@name%>

<% chart_index = table_index = 0 %> <% @sections.each do |section| %> <% next if not section %>

<%= section[:title] %>

<% if section[:messages] %> <% section[:messages].each do |message|%>
<%= message %>
<% end %> <% elsif section[:tables].size == 0 %>
No Data to Show for <%= section[:title] %>
<% end %> <% section[:tables].each do |table| %> <% next if not table %>
>
<% if table.has_key?(:data_color) %> <% else %>
<% end %> <% table[:header].each_with_index do |header, header_index| %> <% if not table[:units] or table[:units][header_index] == '' or not table[:units][header_index] %> <% else %> <% end %> <% end %> <% table[:data].each_with_index do |row, row_index| %> <% row.each_with_index do |column, column_index| %> <% if column.class.to_s == 'Hash' and column.key?(:sub_header) %> <% else %> <% if table.has_key?(:data_color) %> <% else %> <% end %> <% end %> <% end %> <% end %>
<%= header %><%= "#{header} (#{table[:units][header_index]})" %>
(<%= column[:sub_header] %>)
"><%= column %><%= column %>
<% table_index += 1 %>
<% if table[:chart_type] == 'simple_pie' %> <% chart_index += 1 %>
<% elsif table[:chart_type] == 'vertical_stacked_bar' %> <% chart_index += 1 %>
<% elsif table[:chart_type] == 'vertical_grouped_bar' %> <% chart_index += 1 %>
<% elsif table[:chart_type] == 'scatter' %> <% chart_index += 1 %>
<% elsif table[:chart_type] == 'vertical_grouped_bar_with_comp_line' %> <% chart_index += 1 %>
<% elsif table[:chart_type] == 'multi_step_line_grid' %>
<% table[:chart].each do |chart| %> <% chart_index += 1 %>
<% end %>
<% else %> <% end %> <% end %> <% end %>