feat: optimize routing and operations views
This commit is contained in:
@@ -52,6 +52,42 @@ export function createBarOption(params: {
|
||||
};
|
||||
}
|
||||
|
||||
export function createDualAxisBarLineOption(params: {
|
||||
labels: string[];
|
||||
bar: { name: string; data: number[] };
|
||||
line: { name: string; data: Array<number | null> };
|
||||
}): 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: '平均分钟', ...axisStyle },
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: params.bar.name,
|
||||
data: params.bar.data,
|
||||
type: 'bar',
|
||||
barMaxWidth: 28,
|
||||
itemStyle: { borderRadius: [6, 6, 0, 0] },
|
||||
},
|
||||
{
|
||||
name: params.line.name,
|
||||
data: params.line.data,
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
smooth: true,
|
||||
symbolSize: 7,
|
||||
lineStyle: { width: 3 },
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function createPieOption(params: {
|
||||
data: Array<{ name: string; value: number }>;
|
||||
}): EChartsOption {
|
||||
|
||||
Reference in New Issue
Block a user