diff --git a/src/components/LineWithKPI.jsx b/src/components/LineWithKPI.jsx index 77191bf..0a77acc 100644 --- a/src/components/LineWithKPI.jsx +++ b/src/components/LineWithKPI.jsx @@ -52,15 +52,22 @@ export default observer((props) => { }, legend: { custom: true, - items: Object.keys(seriesData).map((ele) => ({ - id: ele, - name: ele, - value: ele, - marker: { symbol: ele.includes(' ') ? 'hyphen' : 'circle', style: { fill: colorSets[ele], stroke: colorSets[ele?.split(' ')?.[0]], r: 3, lineWidth: 2, color: colorSets[ele] } }, - })).sort(sortBy('name')), + items: Object.keys(seriesData) + .map((ele) => ({ + id: ele, + name: ele, + value: ele, + marker: { + symbol: ele.includes(' ') ? 'hyphen' : 'circle', + style: { fill: colorSets[ele], stroke: colorSets[ele?.split(' ')?.[0]] || '#5B8FF9', r: 3, lineWidth: 2, color: colorSets[ele] }, + }, + })) + .sort(sortBy('name')), }, tooltip: { - customItems: (items) => items.sort(sortBy('name')), + // title: dataFieldAlias[config.yField]?.alias, + showTitle: true, + customItems: (items) => items.sort(sortBy('name')).map((ele) => ({ ...ele, title: `${ele.title} ${dataFieldAlias[config.yField]?.alias}` })), }, // annotations: [ // // 低于 0 颜色变化 diff --git a/src/views/Home.jsx b/src/views/Home.jsx index 65a5105..3b21614 100644 --- a/src/views/Home.jsx +++ b/src/views/Home.jsx @@ -23,6 +23,7 @@ const topSeries = [ { key: 'destination', value: 'destination', label: '目的地', graphVisible: true }, { key: 'GuestGroupType', value: 'GuestGroupType', label: '客群类别', graphVisible: false }, { key: 'country', value: 'country', label: '国籍', graphVisible: true }, + { key: 'webcode', value: 'webcode', label: '站点', graphVisible: false }, ]; const allGroupTypes = [ @@ -228,7 +229,6 @@ export default observer(() => {

{showDiff === false ? '走势' : '对比'}

- {showDiff && } {searchValues.yearDiff && (