0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed dynamic color for open rate chart

This commit is contained in:
Peter Zimon 2021-02-23 14:27:25 +01:00
parent 66a813e6cb
commit b51cec8094
3 changed files with 14 additions and 4 deletions

View file

@ -128,9 +128,11 @@ export default Component.extend({
setChartData({dateLabels, dateValues, label = 'Total Members'}) { setChartData({dateLabels, dateValues, label = 'Total Members'}) {
let backgroundColors = this.lineColor; let backgroundColors = this.lineColor;
if (this.chartType === 'open-rate') { if (this.chartType === 'open-rate') {
backgroundColors = dateValues.map((dateValue) => { console.log(dateLabels);
if (dateValue) { backgroundColors = dateLabels.map((val) => {
if (val) {
return this.lineColor; return this.lineColor;
} else { } else {
return (this.nightShift ? '#7C8B9A' : '#CED4D9'); return (this.nightShift ? '#7C8B9A' : '#CED4D9');

View file

@ -441,6 +441,14 @@
fill: var(--black); fill: var(--black);
} }
.gh-dashboard-box.top-members .gh-dashboard-header-container {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--whitegrey-d2);
padding-bottom: 14px;
}
/* Activity feed */ /* Activity feed */
.gh-dashboard-area.activity-feed { .gh-dashboard-area.activity-feed {
grid-column: 3 / 4; grid-column: 3 / 4;

View file

@ -122,8 +122,8 @@
<section class="gh-dashboard-area members-activity"> <section class="gh-dashboard-area members-activity">
{{#if (and this.showTopMembers this.topMembersData)}} {{#if (and this.showTopMembers this.topMembersData)}}
<div class="gh-dashboard-box grey activity-feed"> <div class="gh-dashboard-box grey top-members">
<div class="flex items-center justify-between"> <div class="gh-dashboard-header-container">
<h4 class="gh-dashboard-header">Top members</h4> <h4 class="gh-dashboard-header">Top members</h4>
<h4 class="gh-dashboard-header secondary">Open rate</h4> <h4 class="gh-dashboard-header secondary">Open rate</h4>
</div> </div>