Skip to content

Commit

Permalink
feat: add mark background origin data field
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 committed Jan 10, 2024
1 parent c224c7b commit 2e1a632
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 6 additions & 0 deletions packages/plots/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.1.9

`2024-01-09`

- 🔥 `markBackground` 新增 originData 字段,保留原始数据

## 2.1.8
## 2.1.7

Expand Down
2 changes: 1 addition & 1 deletion packages/plots/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design/plots",
"version": "2.1.8",
"version": "2.1.9",
"description": "G2Plot Statistical chart",
"bugs": {
"url": "https://github.com/ant-design/ant-design-charts/issues"
Expand Down
3 changes: 3 additions & 0 deletions packages/plots/src/core/plots/bar/adaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export function adaptor(params: Params) {
const domainMax = 'domainMax';
const backgroundData = data.map((item) => {
return {
originData: {
...item,
},
...omit(item, yField),
[domainMax]: domain[domain.length - 1],
};
Expand Down
14 changes: 0 additions & 14 deletions packages/plots/src/core/plots/column/adaptor.ts

This file was deleted.

0 comments on commit 2e1a632

Please sign in to comment.