-
Notifications
You must be signed in to change notification settings - Fork 211
Description
🏷 Version
Package | Version |
---|---|
@antv/s2 | 1.29 |
@antv/s2-react | |
@antv/s2-vue |
Sheet Type
- PivotSheet
- [ x ] TableSheet
- GridAnalysisSheet
- StrategySheet
🖋 Description
err info
`
Error: node_modules/@antv/s2/esm/index.d.ts:1188:5 - error TS2416: Property 'getIconStyle' in type 'DataCell' is not assignable to the same property in base type 'BaseCell'.
Type '() => IconCfg | undefined' is not assignable to type '() => IconTheme'.
Type 'IconCfg | undefined' is not assignable to type 'IconTheme'.
Type 'undefined' is not assignable to type 'IconTheme'.
1188 getIconStyle(): IconCfg | undefined;
~~~~~~~~~~~~
Error: node_modules/@antv/s2/esm/index.d.ts:2885:9 - error TS2411: Property 'red' of type 'string | undefined' is not assignable to 'string' index type 'string'.
2885 red?: string;
~~~
Error: node_modules/@antv/s2/esm/index.d.ts:2886:9 - error TS2411: Property 'green' of type 'string | undefined' is not assignable to 'string' index type 'string'.
2886 green?: string;
~~~~~
Error: node_modules/@antv/s2/esm/index.d.ts:2887:9 - error TS2411: Property 'yellow' of type 'string | undefined' is not assignable to 'string' index type 'string'.
2887 yellow?: string;
~~~~~~
`
demo info
const s2Data:S2DataConfig = { fields: { columns: ['province', 'city', 'type', 'price'] }, data: [ { "province": "浙江", "city": "杭州", "type": "笔", "price": 1 }, { "province": "浙江", "city": "杭州", "type": "纸张", "price": 2 }, { "province": "浙江", "city": "舟山", "type": "笔", "price": 17 }, { "province": "浙江", "city": "舟山", "type": "纸张", "price": 6 }, { "province": "吉林", "city": "长春", "type": "笔", "price": 8 }, { "province": "吉林", "city": "白山", "type": "笔", "price": 12 }, { "province": "吉林", "city": "长春", "type": "纸张", "price": 3 }, { "province": "吉林", "city": "白山", "type": "纸张", "price": 25 }, { "province": "浙江", "city": "杭州", "type": "笔", "price": 20 }, { "province": "浙江", "city": "杭州", "type": "纸张", "price": 10 }, { "province": "浙江", "city": "舟山", "type": "笔", "price": 15 }, { "province": "浙江", "city": "舟山", "type": "纸张", "price": 2 }, { "province": "吉林", "city": "长春", "type": "笔", "price": 15 }, { "province": "吉林", "city": "白山", "type": "笔", "price": 30 }, { "province": "吉林", "city": "长春", "type": "纸张", "price": 40 }, { "province": "吉林", "city": "白山", "type": "纸张", "price": 50 } ], }; const s2Options:S2Options = { width: 1600, height: 580 } const themeCfg:ThemeCfg={}; // TableSheet PivotSheet const s2 = new TableSheet(this.CanvasTab.nativeElement,s2Data,s2Options); // s2.setThemeCfg(themeCfg); s2.render();