|
@@ -135,25 +135,19 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
yAxisID: 'y',
|
|
yAxisID: 'y',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '点击数',
|
|
|
|
|
- data: [],
|
|
|
|
|
- backgroundColor: '#722ed1',
|
|
|
|
|
- yAxisID: 'y',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '失败数',
|
|
|
|
|
|
|
+ label: '展示用户',
|
|
|
data: [],
|
|
data: [],
|
|
|
- backgroundColor: '#f5222d',
|
|
|
|
|
|
|
+ backgroundColor: '#482880',
|
|
|
yAxisID: 'y',
|
|
yAxisID: 'y',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '展示用户',
|
|
|
|
|
|
|
+ label: '点击数',
|
|
|
data: [],
|
|
data: [],
|
|
|
- backgroundColor: '#482880',
|
|
|
|
|
|
|
+ backgroundColor: '#722ed1',
|
|
|
yAxisID: 'y',
|
|
yAxisID: 'y',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '打开用户',
|
|
|
|
|
|
|
+ label: '点击用户',
|
|
|
data: [],
|
|
data: [],
|
|
|
backgroundColor: '#0066CC',
|
|
backgroundColor: '#0066CC',
|
|
|
yAxisID: 'y',
|
|
yAxisID: 'y',
|
|
@@ -224,7 +218,7 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
label += ': ';
|
|
label += ': ';
|
|
|
}
|
|
}
|
|
|
// 如果是折线图(转化率),格式化显示两位小数并添加百分号
|
|
// 如果是折线图(转化率),格式化显示两位小数并添加百分号
|
|
|
- if (context.datasetIndex >= 8) {
|
|
|
|
|
|
|
+ if (context.datasetIndex >= 7) {
|
|
|
// 假设6-8是折线图数据集
|
|
// 假设6-8是折线图数据集
|
|
|
const value = typeof context.raw === 'number' ? context.raw : 0;
|
|
const value = typeof context.raw === 'number' ? context.raw : 0;
|
|
|
label += value.toFixed(2) + '%';
|
|
label += value.toFixed(2) + '%';
|
|
@@ -598,42 +592,39 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
...this.combinedChartData.datasets[4],
|
|
...this.combinedChartData.datasets[4],
|
|
|
- data: this.dailyTrends.map((t) => t.opened || 0),
|
|
|
|
|
|
|
+ data: this.dailyTrends.map((t) => t.displayedUsers || 0),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
...this.combinedChartData.datasets[5],
|
|
...this.combinedChartData.datasets[5],
|
|
|
- data: this.dailyTrends.map((t) => t.failed || 0),
|
|
|
|
|
|
|
+ data: this.dailyTrends.map((t) => t.opened || 0),
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
...this.combinedChartData.datasets[6],
|
|
...this.combinedChartData.datasets[6],
|
|
|
- data: this.dailyTrends.map((t) => t.displayedUsers || 0),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- ...this.combinedChartData.datasets[7],
|
|
|
|
|
data: this.dailyTrends.map((t) => t.openedUsers || 0),
|
|
data: this.dailyTrends.map((t) => t.openedUsers || 0),
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 折线图数据
|
|
// 折线图数据
|
|
|
{
|
|
{
|
|
|
- ...this.combinedChartData.datasets[8],
|
|
|
|
|
|
|
+ ...this.combinedChartData.datasets[7],
|
|
|
data: this.dailyTrends.map((t) =>
|
|
data: this.dailyTrends.map((t) =>
|
|
|
this.preciseRound((t.deliveredRate || 0) * 100, 2)
|
|
this.preciseRound((t.deliveredRate || 0) * 100, 2)
|
|
|
),
|
|
),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- ...this.combinedChartData.datasets[9],
|
|
|
|
|
|
|
+ ...this.combinedChartData.datasets[8],
|
|
|
data: this.dailyTrends.map((t) =>
|
|
data: this.dailyTrends.map((t) =>
|
|
|
this.preciseRound((t.displayRate || 0) * 100, 2)
|
|
this.preciseRound((t.displayRate || 0) * 100, 2)
|
|
|
),
|
|
),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- ...this.combinedChartData.datasets[10],
|
|
|
|
|
|
|
+ ...this.combinedChartData.datasets[9],
|
|
|
data: this.dailyTrends.map((t) =>
|
|
data: this.dailyTrends.map((t) =>
|
|
|
this.preciseRound((t.clickThroughRate || 0) * 100, 2)
|
|
this.preciseRound((t.clickThroughRate || 0) * 100, 2)
|
|
|
),
|
|
),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- ...this.combinedChartData.datasets[11],
|
|
|
|
|
|
|
+ ...this.combinedChartData.datasets[10],
|
|
|
data: this.dailyTrends.map((t) =>
|
|
data: this.dailyTrends.map((t) =>
|
|
|
this.preciseRound((t.actualClickThroughRate || 0) * 100, 2)
|
|
this.preciseRound((t.actualClickThroughRate || 0) * 100, 2)
|
|
|
),
|
|
),
|