BathHacked/energy-sparks

View on GitHub
app/views/pupils/analysis/show.html.erb

Summary

Maintainability
Test Coverage
<div class="d-flex justify-content-between align-items-center flex-wrap">
  <h1>
    <%= t('pupils.analysis.explore_energy_data_html', fuel_type: t("common.#{i18n_key_from(@fuel_type)}")) %>
  </h1>
  <div>
    <%= link_to t('pupils.analysis.explore_data'),
                pupils_school_analysis_path(@school, category: @category),
                class: 'btn btn-outline-dark font-weight-bold' %>
  </div>
</div>

<div id="chart_wrapper_<%= @chart_type %>" class="pt-3 chart-wrapper">
  <div class="pupil-chart-titles dynamic-titles">
      <h3></h3>
      <h5></h5>
  </div>
  <%= component 'chart',
                school: @school,
                chart_type: @chart_type.to_s,
                no_zoom: true,
                axis_controls: false,
                chart_config: create_chart_config(@school, @chart_type, apply_preferred_units: false),
                fuel_type: @fuel_type %>
</div>