Create academic year checkbox selectors. Refresh page with years selected on

checkbox change.  Draw bar graphs for each academic year selected.
Center bar graphs in their column.  Color the columns to match the
sample colors on the checkboxes.  Add scores on beta to top of graph.
Automatically display the most recent year of data for the district.
Modify logic for the insufficient data message or the 'measure not based
on student/teacher surveys' message so it only shows if there are no
bars with data to display.
This commit is contained in:
rebuilt 2022-06-03 04:30:55 +02:00
parent 30c97f4428
commit 50256cacce
15 changed files with 355 additions and 174 deletions

View file

@ -3,8 +3,8 @@
<rect x="0" y="0" width="100%" height="<%= analyze_zone_height * 2 %>%" fill="#edecf0"/>
<rect x="0" y="<%= analyze_zone_height * 2 %>%" width="100%" height="<%= analyze_zone_height * 3 %>%" fill="#fffaee"/>
<rect x="0" y="0" width="100%" height="<%= analyze_graph_height %>%" fill="none" stroke="grey"/>
<line x1="<%= grouped_chart_divider_x(1) %>%" y1="0" x2="<%= grouped_chart_divider_x(1) %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2"/>
<line x1="<%= grouped_chart_divider_x(2) %>%" y1="0" x2="<%= grouped_chart_divider_x(2) %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2"/>
<line x1="<%= column_end_x(1) %>%" y1="0" x2="<%= column_end_x(1) %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2"/>
<line x1="<%= column_end_x(2) %>%" y1="0" x2="<%= column_end_x(2) %>%" y2="85%" stroke="grey" stroke-width="1" stroke-dasharray="5,2"/>
<rect x="0" y="<%= benchmark_y %>%" width="100%" height="<%= benchmark_height %>%" fill="black"/>
<g id="zone-dividers" stroke-width="1" >
<line x1="0" y1="17%" x2="100%" y2="17%" stroke="white" />
@ -31,11 +31,10 @@
</g>
</g>
<% presenter = StudentGroupedBarColumnPresenter.new(measure: measure, school: @school, academic_year: @academic_year, position: 1) %>
<%= render partial: "grouped_bar_column", locals: {presenter: presenter} %>
<% presenter = TeacherGroupedBarColumnPresenter.new(measure: measure, school: @school, academic_year: @academic_year, position: 2) %>
<%= render partial: "grouped_bar_column", locals: {presenter: presenter} %>
<% presenter = GroupedBarColumnPresenter.new(measure: measure, school: @school, academic_year: @academic_year, position: 3) %>
<%= render partial: "grouped_bar_column", locals: {presenter: presenter} %>
<% presenters = [StudentGroupedBarColumnPresenter, TeacherGroupedBarColumnPresenter, GroupedBarColumnPresenter] %>
<% presenters.each_with_index do |presenter, index| %>
<% p = presenter.new(measure: measure, school: @school, academic_years: @selected_academic_years, position: index ) %>
<%= render partial: "grouped_bar_column", locals: {presenter: p} %>
<% end %>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After