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

@@ -31658,12 +31658,12 @@
} }
}, },
"node_modules/echarts": { "node_modules/echarts": {
"version": "5.2.2", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.2.tgz", "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.0.tgz",
"integrity": "sha512-yxuBfeIH5c+0FsoRP60w4De6omXhA06c7eUYBsC1ykB6Ys2yK5fSteIYWvkJ4xJVLQgCvAdO8C4mN6MLeJpBaw==", "integrity": "sha512-zENufmwFE6WjM+24tW3xQq4ICqQtI0CGj4bDVDNd3BK3LtaA/5wBp+64ykIyKy3QElz0cieKqSYP4FX9Lv9MwQ==",
"dependencies": { "dependencies": {
"tslib": "2.3.0", "tslib": "2.3.0",
"zrender": "5.2.1" "zrender": "5.3.0"
} }
}, },
"node_modules/echarts/node_modules/tslib": { "node_modules/echarts/node_modules/tslib": {
@@ -58561,9 +58561,9 @@
} }
}, },
"node_modules/zrender": { "node_modules/zrender": {
"version": "5.2.1", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.2.1.tgz", "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.0.tgz",
"integrity": "sha512-M3bPGZuyLTNBC6LiNKXJwSCtglMp8XUEqEBG+2MdICDI3d1s500Y4P0CzldQGsqpRVB7fkvf3BKQQRxsEaTlsw==", "integrity": "sha512-Ln2QB5uqI1ftNYMtCRxd+XDq6MOttLgam2tmhKAVA+j0ko47UT+VNlDvKTkqe4K2sJhBvB0EhYNLebqlCTjatQ==",
"dependencies": { "dependencies": {
"tslib": "2.3.0" "tslib": "2.3.0"
} }
@@ -59699,7 +59699,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"d3-array": "^1.2.0", "d3-array": "^1.2.0",
"echarts": "^5.2.2", "echarts": "^5.3.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"moment": "^2.26.0" "moment": "^2.26.0"
}, },
@@ -76498,7 +76498,7 @@
"version": "file:plugins/plugin-chart-echarts", "version": "file:plugins/plugin-chart-echarts",
"requires": { "requires": {
"d3-array": "^1.2.0", "d3-array": "^1.2.0",
"echarts": "^5.2.2", "echarts": "^5.3.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"moment": "^2.26.0" "moment": "^2.26.0"
} }
@@ -84839,12 +84839,12 @@
} }
}, },
"echarts": { "echarts": {
"version": "5.2.2", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.2.2.tgz", "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.0.tgz",
"integrity": "sha512-yxuBfeIH5c+0FsoRP60w4De6omXhA06c7eUYBsC1ykB6Ys2yK5fSteIYWvkJ4xJVLQgCvAdO8C4mN6MLeJpBaw==", "integrity": "sha512-zENufmwFE6WjM+24tW3xQq4ICqQtI0CGj4bDVDNd3BK3LtaA/5wBp+64ykIyKy3QElz0cieKqSYP4FX9Lv9MwQ==",
"requires": { "requires": {
"tslib": "2.3.0", "tslib": "2.3.0",
"zrender": "5.2.1" "zrender": "5.3.0"
}, },
"dependencies": { "dependencies": {
"tslib": { "tslib": {
@@ -105702,9 +105702,9 @@
} }
}, },
"zrender": { "zrender": {
"version": "5.2.1", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.2.1.tgz", "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.0.tgz",
"integrity": "sha512-M3bPGZuyLTNBC6LiNKXJwSCtglMp8XUEqEBG+2MdICDI3d1s500Y4P0CzldQGsqpRVB7fkvf3BKQQRxsEaTlsw==", "integrity": "sha512-Ln2QB5uqI1ftNYMtCRxd+XDq6MOttLgam2tmhKAVA+j0ko47UT+VNlDvKTkqe4K2sJhBvB0EhYNLebqlCTjatQ==",
"requires": { "requires": {
"tslib": "2.3.0" "tslib": "2.3.0"
}, },

View File

@@ -27,7 +27,7 @@
}, },
"dependencies": { "dependencies": {
"d3-array": "^1.2.0", "d3-array": "^1.2.0",
"echarts": "^5.2.2", "echarts": "^5.3.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"moment": "^2.26.0" "moment": "^2.26.0"
}, },

View File

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

View File

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

View File

@@ -198,7 +198,15 @@ export function transformSeries(
opacity: opacity * areaOpacity, opacity: opacity * areaOpacity,
} }
: undefined, : 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, showSymbol,
symbolSize: markerSize, symbolSize: markerSize,
label: { label: {