use async load
This commit is contained in:
@@ -45,6 +45,13 @@ const {
|
||||
} = useStoreChartWindow(dateTextList);
|
||||
const chartOption = computed<EChartsOption>(() => ({
|
||||
...buildStoreBaseChartOption(visibleDateTextList.value),
|
||||
grid: {
|
||||
top: 48,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
@@ -76,6 +83,7 @@ const chartOption = computed<EChartsOption>(() => ({
|
||||
type: "line",
|
||||
yAxisIndex: 0,
|
||||
smooth: true,
|
||||
showSymbol: false,
|
||||
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0)
|
||||
},
|
||||
{
|
||||
@@ -183,7 +191,7 @@ function getDateEnd(dateText: string): Date {
|
||||
|
||||
h2 {
|
||||
color: #0f172a;
|
||||
margin: 0 0 .875rem 0;
|
||||
margin: 0 0 .5rem 0;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ export function buildStoreBaseChartOption(dateTextList: string[]): EChartsOption
|
||||
return {
|
||||
color: ["#2563eb", "#0f766e", "#d97706", "#db2777", "#7c3aed"],
|
||||
grid: {
|
||||
top: 48,
|
||||
left: 12,
|
||||
right: 12,
|
||||
bottom: 12,
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
|
||||
Reference in New Issue
Block a user