Skip to content

Commit

Permalink
chore: bump echarts to 5.3.0 (#18162)
Browse files Browse the repository at this point in the history
* chore: bump echarts to 5.3.0

* change to official 5.3.0 and reintroduce bold effect
  • Loading branch information
villebro authored Jan 27, 2022
1 parent a2bad75 commit dbe0a8b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
32 changes: 16 additions & 16 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"d3-array": "^1.2.0",
"echarts": "^5.2.2",
"echarts": "^5.3.0",
"lodash": "^4.17.15",
"moment": "^2.26.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ function createCustomizeSection(
[1, t('Secondary')],
],
default: yAxisIndex,
clearable: false,
renderTrigger: true,
description: t('Primary or secondary y-axis'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export default function transformProps(
}, {}) as Record<string, DataRecordValue[]>;

const { setDataMask = () => {} } = hooks;
const alignTicks = yAxisIndex !== yAxisIndexB;

const echartOptions: EChartsCoreOption = {
useUTC: true,
Expand Down Expand Up @@ -296,6 +297,7 @@ export default function transformProps(
name: yAxisTitle,
nameGap: yAxisTitleMargin,
nameLocation: yAxisTitlePosition === 'Left' ? 'middle' : 'end',
alignTicks,
},
{
...defaultYAxis,
Expand All @@ -308,6 +310,7 @@ export default function transformProps(
axisLabel: { formatter: formatterSecondary },
scale: truncateYAxis,
name: yAxisTitleSecondary,
alignTicks,
},
],
tooltip: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit dbe0a8b

Please sign in to comment.