Skip to content

Commit

Permalink
chore: update interaction (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 committed Jun 20, 2024
1 parent 5d52c96 commit fe4bd86
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 17 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.2.3

`2024-06-20`

- 💄 内置交互逻辑 `elementHighlightByColor` 更新为 `elementHighlight`

## 2.2.2

`2024-05-06`
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.2.2",
"version": "2.2.3",
"description": "G2Plot Statistical chart",
"bugs": {
"url": "https://github.com/ant-design/ant-design-charts/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/src/core/plots/bar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Bar extends Plot<BarOptions> {
tooltip: {
shared: true,
},
elementHighlightByColor: {
elementHighlight: {
background: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/src/core/plots/column/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Column extends Plot<ColumnOptions> {
tooltip: {
shared: true,
},
elementHighlightByColor: {
elementHighlight: {
background: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/src/core/plots/heatmap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Heatmap extends Plot<HeatmapOptions> {
{
type: 'point',
interaction: {
elementHighlightByColor: {
elementHighlight: {
background: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/src/core/plots/histogram/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Histogram extends Plot<HistogramOptions> {
type: 'rect',
transform: [{ type: 'binX', y: 'count' }],
interaction: {
elementHighlightByColor: {
elementHighlight: {
background: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/src/core/plots/waterfall/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Waterfall extends Plot<WaterfallOptions> {
{
type: 'interval',
interaction: {
elementHighlightByColor: {
elementHighlight: {
background: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion site/examples/statistics/bar/demo/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const DemoBar = () => {
},
},
interaction: {
elementHighlightByColor: false,
elementHighlight: false,
},
};
return <Bar {...config} />;
Expand Down
2 changes: 1 addition & 1 deletion site/examples/statistics/column/demo/bar-dodged.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DemoColumn = () => {
},
interaction: {
tooltip: { shared: true },
elementHighlightByColor: { background: true },
elementHighlight: { background: true },
},
};
return <Column {...config} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DemoDualAxes = () => {
label: { position: 'inside' },
interaction: {
elementHighlight: true,
elementHighlightByColor: { background: true },
elementHighlight: { background: true },
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const DemoDualAxes = () => {
group: true,
style: { maxWidth: 50 },
label: { position: 'inside' },
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const DemoDualAxes = () => {
scale: { y: { domainMax: 1200 } },
interaction: {
elementHighlight: true,
elementHighlightByColor: { background: true },
elementHighlight: { background: true },
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DemoDualAxes = () => {
yField: 'value',
colorField: 'type',
group: true,
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const DemoDualAxes = () => {
colorField: 'type',
group: true,
style: { maxWidth: 80 },
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DemoDualAxes = () => {
colorField: 'type',
style: { maxWidth: 80 },
scale: { y: { domainMax: 1200 } },
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const DemoDualAxes = () => {
stack: true,
style: { maxWidth: 80 },
scale: { y: { domainMax: 1200 } },
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const DemoDualAxes = () => {
style: { maxWidth: 80 },
tooltip: { channel: 'y0', valueFormatter: '.0%' },
axis: { y: { title: 'value', style: { titleFill: '#5B8FF9' } } },
interaction: { elementHighlightByColor: { background: true } },
interaction: { elementHighlight: { background: true } },
},
{
data: transformData,
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"typescript": "^3.6.5"
},
"dependencies": {
"@ant-design/plots": "^2.0.0",
"@ant-design/plots": "workspace:*",
"antd": "^4.16.13",
"insert-css": "^2.0.0",
"lodash-es": "^4.17.21",
Expand Down

0 comments on commit fe4bd86

Please sign in to comment.