Skip to content

Commit

Permalink
Merge pull request #18841 from apache/fix-endLabel
Browse files Browse the repository at this point in the history
fix(endLabel): endLabel fail with null data #18839
  • Loading branch information
Ovilia authored Jul 5, 2023
2 parents b79777e + 1d10ba8 commit a92b0df
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/chart/line/LineView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,10 @@ class LineView extends ChartView {
});
}
if (valueAnimation) {
labelInner(endLabel).setLabelText(value);
const inner = labelInner(endLabel);
if (typeof inner.setLabelText === 'function') {
inner.setLabelText(value);
}
}
}
}
Expand Down
44 changes: 43 additions & 1 deletion test/line-endLabel.html

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

0 comments on commit a92b0df

Please sign in to comment.