feat: add signature quality period trends

This commit is contained in:
hectorzhao
2026-08-09 22:54:32 +08:00
parent 608662a054
commit 35de17a2d4
11 changed files with 385 additions and 30 deletions
+24
View File
@@ -31,6 +31,30 @@ export function createLineOption(params: {
};
}
export function createQualityTrendOption(params: {
labels: string[];
sent: number[];
delivered: number[];
rates: number[];
}): EChartsOption {
return {
color: [...chartPalette],
grid: { left: 12, right: 18, top: 42, bottom: 8, containLabel: true },
legend: { top: 0, right: 0, textStyle: { color: themeColors.textMuted } },
tooltip: { trigger: 'axis' },
xAxis: { type: 'category', data: params.labels, ...axisStyle },
yAxis: [
{ type: 'value', name: '业务条数', minInterval: 1, ...axisStyle },
{ type: 'value', name: '到达率', min: 0, max: 100, ...axisStyle, axisLabel: { formatter: '{value}%', color: themeColors.textMuted } },
],
series: [
{ name: '发送业务条数', data: params.sent, type: 'line', smooth: true, symbolSize: 6, lineStyle: { width: 3 } },
{ name: '到达业务条数', data: params.delivered, type: 'line', smooth: true, symbolSize: 6, lineStyle: { width: 3 } },
{ name: '到达率', data: params.rates, type: 'line', yAxisIndex: 1, smooth: true, symbolSize: 6, lineStyle: { width: 3 } },
],
};
}
export function createBarOption(params: {
labels: string[];
series: Array<{ name: string; data: number[] }>;