Merge pull request #10783 from dataease/pr@dev-v2@fix_chart_line_label_overlap_hide

fix(图表): 折线图开启标签重叠隐藏
This commit is contained in:
wisonic-s 2024-07-03 20:09:09 +08:00 committed by GitHub
commit 078e2dcbd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,7 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
fields: [],
...tmpOptions.label,
offsetY: -8,
layout: [{ type: 'hide-overlap' }, { type: 'limit-in-plot' }],
formatter: (data: Datum) => {
if (!labelAttr.seriesLabelFormatter?.length) {
return data.value