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

@ -27,22 +27,22 @@ module AnalyzeHelper
1
end
def grouped_chart_width
def grouped_chart_column_width
graph_width / data_sources
end
def grouped_chart_divider_x(position)
zone_label_width + (grouped_chart_width * position)
def column_end_x(position)
zone_label_width + (grouped_chart_column_width * position)
end
def column_start_x(position)
column_end_x(position - 1)
end
def bar_label_height
(100 - ((100 - analyze_graph_height) / 2))
end
def bar_label_x(position)
zone_label_width + (grouped_chart_width * position) - (grouped_chart_width / 2)
end
def analyze_zone_height
analyze_graph_height / 5
end
@ -66,4 +66,8 @@ module AnalyzeHelper
def analyze_subcategory_link(district:, school:, academic_year:, category:, subcategory:)
"/districts/#{district.slug}/schools/#{school.slug}/analyze?year=#{academic_year.range}&category=#{category.category_id}&subcategory=#{subcategory.subcategory_id}"
end
def colors
@colors ||= ['#49416D', '#FFC857', '#920020', '#00B0B3', '#B2D236', '#595959']
end
end

View file

@ -0,0 +1,2 @@
module ColorHelper
end