We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.12.0
https://visactor.io/vtable/demo/table-type/pivot-analysis-table-indicator-row
样例地址:https://visactor.io/vtable/demo/table-type/pivot-analysis-table-indicator-row 样例代码: `let tableInstance; fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_Pivot_data.json') .then(res => res.json()) .then(data => { const option = { records: data, rows: [ { dimensionKey: 'City', title: 'City', headerStyle: { textStick: true } } ], columns: [ { dimensionKey: 'Category', title: 'Category', headerStyle: { textStick: true }, width: 'auto' } ], indicators: [ { indicatorKey: 'Quantity', title: 'Quantity', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal', color: 'purple' }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return 'black'; return 'red'; } } }, { indicatorKey: 'Sales', title: 'Sales', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal', color: 'red' }, format: rec => { return '$' + Number(rec).toFixed(2); }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return 'black'; return 'red'; } } }, { indicatorKey: 'Profit', title: 'Profit', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal', color: 'green' }, format: rec => { return '$' + Number(rec).toFixed(2); }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return 'black'; return 'red'; } } } ], corner: { titleOnDimension: 'row', headerStyle: { textStick: true } }, indicatorTitle: 'indicators title', indicatorsAsCol: false, dataConfig: { sortRules: [ { sortField: 'Category', sortBy: ['Office Supplies', 'Technology', 'Furniture'] } ] }, defaultHeaderColWidth: [120, 'auto'], widthMode: 'standard' }; tableInstance = new VTable.PivotTable(document.getElementById(CONTAINER_ID), option); window['tableInstance'] = tableInstance; const search = new SearchComponent({ table: tableInstance, autoJump: true }); window.search = search; const dom = document.getElementById(CONTAINER_ID);
const searchContainer = document.createElement('div'); searchContainer.style.position = 'absolute'; searchContainer.style.top = '0'; searchContainer.style.right = '0'; searchContainer.style.backgroundColor = '#FFF'; const input = document.createElement('input'); searchContainer.appendChild(input); const result = document.createElement('span'); result.innerText = '0/0'; searchContainer.appendChild(result); const searchBtn = document.createElement('button'); searchBtn.innerText = 'search'; searchContainer.appendChild(searchBtn); const nextBtn = document.createElement('button'); nextBtn.innerText = 'next'; searchContainer.appendChild(nextBtn); const prevBtn = document.createElement('button'); prevBtn.innerText = 'prev'; searchContainer.appendChild(prevBtn); searchBtn.addEventListener('click', () => { const searchResult = search.search(input.value); result.innerText = searchResult.results.length === 0 ? '0/0' : `${searchResult.index + 1}/${searchResult.results.length}`; }); prevBtn.addEventListener('click', () => { const searchResult = search.prev(); result.innerText = searchResult.results.length === 0 ? '0/0' : `${searchResult.index + 1}/${searchResult.results.length}`; }); nextBtn.addEventListener('click', () => { const searchResult = search.next(); result.innerText = searchResult.results.length === 0 ? '0/0' : `${searchResult.index + 1}/${searchResult.results.length}`; }); dom.appendChild(searchContainer);
});`
搜索后搜索到的合并单元格未高亮,且切换无高亮效果,直至切换至最后一个时候展示了部分格高亮,未展示整个合并单元后的高亮效果
对于合并后的单元能进行整体搜索且高亮展示
- OS: - Browser: - Framework:
No response
The text was updated successfully, but these errors were encountered:
Rui-Sun
Successfully merging a pull request may close this issue.
Version
1.12.0
Link to Minimal Reproduction
https://visactor.io/vtable/demo/table-type/pivot-analysis-table-indicator-row
Steps to Reproduce
样例地址:https://visactor.io/vtable/demo/table-type/pivot-analysis-table-indicator-row
样例代码:
`let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_Pivot_data.json')
.then(res => res.json())
.then(data => {
const option = {
records: data,
rows: [
{
dimensionKey: 'City',
title: 'City',
headerStyle: {
textStick: true
}
}
],
columns: [
{
dimensionKey: 'Category',
title: 'Category',
headerStyle: {
textStick: true
},
width: 'auto'
}
],
indicators: [
{
indicatorKey: 'Quantity',
title: 'Quantity',
width: 'auto',
showSort: false,
headerStyle: {
fontWeight: 'normal',
color: 'purple'
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
}
}
},
{
indicatorKey: 'Sales',
title: 'Sales',
width: 'auto',
showSort: false,
headerStyle: {
fontWeight: 'normal',
color: 'red'
},
format: rec => {
return '$' + Number(rec).toFixed(2);
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
}
}
},
{
indicatorKey: 'Profit',
title: 'Profit',
width: 'auto',
showSort: false,
headerStyle: {
fontWeight: 'normal',
color: 'green'
},
format: rec => {
return '$' + Number(rec).toFixed(2);
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
}
}
}
],
corner: {
titleOnDimension: 'row',
headerStyle: {
textStick: true
}
},
indicatorTitle: 'indicators title',
indicatorsAsCol: false,
dataConfig: {
sortRules: [
{
sortField: 'Category',
sortBy: ['Office Supplies', 'Technology', 'Furniture']
}
]
},
defaultHeaderColWidth: [120, 'auto'],
widthMode: 'standard'
};
tableInstance = new VTable.PivotTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;
const search = new SearchComponent({
table: tableInstance,
autoJump: true
});
window.search = search;
const dom = document.getElementById(CONTAINER_ID);
});`
Current Behavior
搜索后搜索到的合并单元格未高亮,且切换无高亮效果,直至切换至最后一个时候展示了部分格高亮,未展示整个合并单元后的高亮效果
![image](https://private-user-images.githubusercontent.com/65565073/402941615-ee95a4a1-6681-4582-84a7-2873934a822e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODU4MDYsIm5iZiI6MTczOTE4NTUwNiwicGF0aCI6Ii82NTU2NTA3My80MDI5NDE2MTUtZWU5NWE0YTEtNjY4MS00NTgyLTg0YTctMjg3MzkzNGE4MjJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDExMDUwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjYjg5YzZmNGE1ODIzNGY2NWUyMmI0MjRiNGM4YjlmMTIwNmZkNThiYWRjZmVjMDhiNDc4NTgwNWZkMWIwMWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KQ73AXO6eq0oKqPwjwtNO5St9iyrZ3Ig50qAPNF0VBU)
Expected Behavior
对于合并后的单元能进行整体搜索且高亮展示
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: