chore: bump echarts to 5.3.0 (#18162)

* chore: bump echarts to 5.3.0

* change to official 5.3.0 and reintroduce bold effect
This commit is contained in:
Ville Brofeldt
2022-01-27 11:26:00 +02:00
committed by GitHub
parent a2bad7551e
commit dbe0a8b519
5 changed files with 30 additions and 18 deletions

View File

@@ -244,6 +244,7 @@ function createCustomizeSection(
[1, t('Secondary')],
],
default: yAxisIndex,
clearable: false,
renderTrigger: true,
description: t('Primary or secondary y-axis'),
},

View File

@@ -266,6 +266,7 @@ export default function transformProps(
}, {}) as Record<string, DataRecordValue[]>;
const { setDataMask = () => {} } = hooks;
const alignTicks = yAxisIndex !== yAxisIndexB;
const echartOptions: EChartsCoreOption = {
useUTC: true,
@@ -296,6 +297,7 @@ export default function transformProps(
name: yAxisTitle,
nameGap: yAxisTitleMargin,
nameLocation: yAxisTitlePosition === 'Left' ? 'middle' : 'end',
alignTicks,
},
{
...defaultYAxis,
@@ -308,6 +310,7 @@ export default function transformProps(
axisLabel: { formatter: formatterSecondary },
scale: truncateYAxis,
name: yAxisTitleSecondary,
alignTicks,
},
],
tooltip: {

View File

@@ -198,7 +198,15 @@ export function transformSeries(
opacity: opacity * areaOpacity,
}
: undefined,
emphasis,
emphasis: {
// bold on hover as required since 5.3.0 to retain backwards feature parity:
// https://apache.github.io/echarts-handbook/en/basics/release-note/5-3-0/#removing-the-default-bolding-emphasis-effect-in-the-line-chart
// TODO: should consider only adding emphasis to currently hovered series
lineStyle: {
width: 'bolder',
},
...emphasis,
},
showSymbol,
symbolSize: markerSize,
label: {