From 8a2f59172b941bf4ca5bbca5c330b962a90df0d4 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 24 Nov 2022 14:28:18 -0600 Subject: [PATCH] Fix #5353: Username capitalization is wrong in reports. --- app/components/time_series_component.rb | 6 +++--- .../time_series_component/time_series_component.html.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/time_series_component.rb b/app/components/time_series_component.rb index 506aff55c..0d0549e43 100644 --- a/app/components/time_series_component.rb +++ b/app/components/time_series_component.rb @@ -58,7 +58,7 @@ class TimeSeriesComponent < ApplicationComponent containLabel: true }, legend: { - data: y_axis.map(&:capitalize), + data: y_axis, type: "scroll", left: 0, padding: [8, 200, 0, 15], @@ -87,7 +87,7 @@ class TimeSeriesComponent < ApplicationComponent yAxis: [type: "value"] * y_axis.size, series: y_axis.map do |name| { - name: name.capitalize, + name: name, type: "line", areaStyle: {}, stack: "all", @@ -109,7 +109,7 @@ class TimeSeriesComponent < ApplicationComponent yAxis: [type: "category", inverse: true] * y_axis.size, series: y_axis.map do |name| { - name: name.capitalize, + name: name, type: "bar", emphasis: { focus: "series" diff --git a/app/components/time_series_component/time_series_component.html.erb b/app/components/time_series_component/time_series_component.html.erb index 2bd2b2a23..f75729166 100644 --- a/app/components/time_series_component/time_series_component.html.erb +++ b/app/components/time_series_component/time_series_component.html.erb @@ -21,7 +21,7 @@ <% dataframe.types.keys.each do |column| %> - <%= tag.th(column.to_s.titleize, class: ("col-expand" if column == dataframe.types.keys.last)) %> + <%= tag.th(column == "date" ? "Date" : column.to_s, class: ("col-expand" if column == dataframe.types.keys.last)) %> <% end %>