Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2017 bug pivot chart select state #2021

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: pivot chart select state #2017\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
8 changes: 4 additions & 4 deletions packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3159,7 +3159,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
if ((this._table as PivotChart)._selectedDataItemsInChart.length >= 1) {
const match = (this._table as PivotChart)._selectedDataItemsInChart.find(item => {
for (const itemKey in item) {
if (item[itemKey] !== datum[itemKey]) {
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
return false;
}
}
Expand All @@ -3169,7 +3169,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
} else if ((this._table as PivotChart)._selectedDimensionInChart?.length) {
// 判断维度点击
const match = (this._table as PivotChart)._selectedDimensionInChart.every(item => {
if (datum[item.key] !== item.value) {
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
return false;
}
return true;
Expand All @@ -3184,7 +3184,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
if ((this._table as PivotChart)._selectedDataItemsInChart.length >= 1) {
const match = (this._table as PivotChart)._selectedDataItemsInChart.find(item => {
for (const itemKey in item) {
if (item[itemKey] !== datum[itemKey]) {
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
return false;
}
}
Expand All @@ -3194,7 +3194,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
} else if ((this._table as PivotChart)._selectedDimensionInChart?.length) {
// 判断维度点击
const match = (this._table as PivotChart)._selectedDimensionInChart.every(item => {
if (datum[item.key] !== item.value) {
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
return false;
}
return true;
Expand Down
Loading