FIX: better legend labels for stacked-charts (#6914)

This commit is contained in:
Joffrey JAFFEUX 2019-01-21 17:10:10 +01:00 committed by GitHub
parent a9edcb2e10
commit 3e1e9fce7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View File

@ -50,7 +50,7 @@ export default Ember.Component.extend({
labels: chartData[0].data.map(cd => cd.x),
datasets: chartData.map(cd => {
return {
label: cd.req,
label: cd.label,
stack: "pageviews-stack",
data: cd.data.map(d => Math.round(parseFloat(d.y))),
backgroundColor: cd.color

View File

@ -396,6 +396,7 @@ export default Ember.Component.extend({
return {
data: collapseWeekly(chartData.data),
req: chartData.req,
label: chartData.label,
color: chartData.color
};
} else {

View File

@ -478,6 +478,7 @@ Report.reopenClass({
report[filledField] = report[dataField].map(rep => {
return {
req: rep.req,
label: rep.label,
color: rep.color,
data: fillMissingDates(
JSON.parse(JSON.stringify(rep.data)),

View File

@ -221,6 +221,7 @@ class Report
{
req: filter,
label: I18n.t("reports.consolidated_page_views.xaxis.#{filter}"),
color: color,
data: ApplicationRequest.where(req_type: ApplicationRequest.req_types[filter])
}

View File

@ -969,9 +969,17 @@ en:
description: "Number of users who made their first post during this period."
consolidated_page_views:
title: "Consolidated Pageviews"
xaxis: "Pagesviews"
xaxis:
page_view_crawler: "Crawlers"
page_view_anon: "Anonymous users"
page_view_logged_in: "Logged in users"
yaxis: "Day"
description: "Pageviews for logged in users, anonymous users and crawlers."
labels:
post: Post
editor: Editor
author: Author
edit_reason: Reason
dau_by_mau:
title: "DAU/MAU"
xaxis: "Day"