FIX: better legend labels for stacked-charts (#6914)
This commit is contained in:
parent
a9edcb2e10
commit
3e1e9fce7e
|
@ -50,7 +50,7 @@ export default Ember.Component.extend({
|
||||||
labels: chartData[0].data.map(cd => cd.x),
|
labels: chartData[0].data.map(cd => cd.x),
|
||||||
datasets: chartData.map(cd => {
|
datasets: chartData.map(cd => {
|
||||||
return {
|
return {
|
||||||
label: cd.req,
|
label: cd.label,
|
||||||
stack: "pageviews-stack",
|
stack: "pageviews-stack",
|
||||||
data: cd.data.map(d => Math.round(parseFloat(d.y))),
|
data: cd.data.map(d => Math.round(parseFloat(d.y))),
|
||||||
backgroundColor: cd.color
|
backgroundColor: cd.color
|
||||||
|
|
|
@ -396,6 +396,7 @@ export default Ember.Component.extend({
|
||||||
return {
|
return {
|
||||||
data: collapseWeekly(chartData.data),
|
data: collapseWeekly(chartData.data),
|
||||||
req: chartData.req,
|
req: chartData.req,
|
||||||
|
label: chartData.label,
|
||||||
color: chartData.color
|
color: chartData.color
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -478,6 +478,7 @@ Report.reopenClass({
|
||||||
report[filledField] = report[dataField].map(rep => {
|
report[filledField] = report[dataField].map(rep => {
|
||||||
return {
|
return {
|
||||||
req: rep.req,
|
req: rep.req,
|
||||||
|
label: rep.label,
|
||||||
color: rep.color,
|
color: rep.color,
|
||||||
data: fillMissingDates(
|
data: fillMissingDates(
|
||||||
JSON.parse(JSON.stringify(rep.data)),
|
JSON.parse(JSON.stringify(rep.data)),
|
||||||
|
|
|
@ -221,6 +221,7 @@ class Report
|
||||||
|
|
||||||
{
|
{
|
||||||
req: filter,
|
req: filter,
|
||||||
|
label: I18n.t("reports.consolidated_page_views.xaxis.#{filter}"),
|
||||||
color: color,
|
color: color,
|
||||||
data: ApplicationRequest.where(req_type: ApplicationRequest.req_types[filter])
|
data: ApplicationRequest.where(req_type: ApplicationRequest.req_types[filter])
|
||||||
}
|
}
|
||||||
|
|
|
@ -969,9 +969,17 @@ en:
|
||||||
description: "Number of users who made their first post during this period."
|
description: "Number of users who made their first post during this period."
|
||||||
consolidated_page_views:
|
consolidated_page_views:
|
||||||
title: "Consolidated Pageviews"
|
title: "Consolidated Pageviews"
|
||||||
xaxis: "Pagesviews"
|
xaxis:
|
||||||
|
page_view_crawler: "Crawlers"
|
||||||
|
page_view_anon: "Anonymous users"
|
||||||
|
page_view_logged_in: "Logged in users"
|
||||||
yaxis: "Day"
|
yaxis: "Day"
|
||||||
description: "Pageviews for logged in users, anonymous users and crawlers."
|
description: "Pageviews for logged in users, anonymous users and crawlers."
|
||||||
|
labels:
|
||||||
|
post: Post
|
||||||
|
editor: Editor
|
||||||
|
author: Author
|
||||||
|
edit_reason: Reason
|
||||||
dau_by_mau:
|
dau_by_mau:
|
||||||
title: "DAU/MAU"
|
title: "DAU/MAU"
|
||||||
xaxis: "Day"
|
xaxis: "Day"
|
||||||
|
|
Loading…
Reference in New Issue