Closed zj-93 closed 4 weeks ago
你好 @zj-93,请编辑你的 issue 标题, 一个言简意赅的 issue 标题可以节省大家的时间, 请不要将标题当做正文, 或者为空。
Hello, @zj-93, please edit your issue title. a concise issue title will save everyone time. please do not leave the title as the body or empty.
conditions 是用于字段标记的场景, 如果你只是想定制表头样式, 请考虑 主题配置 或 自定义单元格
[指标] 对应的单元格类型为 角头 (CornerCell)
s2.setTheme({
cornerCell: {
cell: { ... },
text: {...}
}
})
class CustomCornerCell extends CornerCell {
getBackgroundColor() {
console.log(this.meta)
return {
backgroundColor: 'red',
backgroundColorOpacity: 0.2,
};
}
}
| Package | Version | | @antv/s2 | 1.49.1 |
PivotSheet
🖋 Description
'' 使用hierarchyType: customTree 目录树时,想通过conditions配置表头的样式,使用后发现,插件内部生成的row【指标】这一格无法修改
🔗 Reproduce Link
https://s2-v1.antv.antgroup.com/zh/examples/custom/custom-tree/#custom-tree const s2Options = { width: 600, height: 480, hierarchyType: 'customTree', conditions: { text: [ { field: 'custom-node-1', mapping(value) { return { fill: 'red', }; }, }, ], background: [ { field: 'type', mapping(value) { return { fill: 'red', }; }, }, { field: 'sub_type', mapping(value) { return { fill: 'red', }; }, }, { field: 'measure-a', mapping(value) { return { fill: 'red', }; }, }, ], }, };
😊 Expected Behavior
如何可以修改row【指标】这一格样式
😅 Current Behavior