S2
S2 copied to clipboard
🙏希望能支持自适应列宽和列高
🖋 Description
希望能支持自适应列宽和列高,当前单元格数据比较长,希望可以能以当前列的数据的最大宽度作为列宽,另外单元格支持换行,不希望...折叠了
🏞 What problem does this feature solve
🧐 Suggest the API
name | type | default | description |
---|---|---|---|
- | - | - | - |
+1 求支持🙏
旧版@antv/g文本不支持自动换行,新版已经支持了
升级一下g-canvas,每个单元格应用宽度和样式后new Rect
再rect.getBBox()
获得height
,把每行的maxHeight
增量到 rowCfg - heightByField 里,不知道是否可行,还得考虑到虚拟渲染
+1 求支持🙏 旧版@antv/g文本不支持自动换行,新版已经支持了 升级一下g-canvas,每个单元格应用宽度和样式后
new Rect
再rect.getBBox()
获得height
,把每行的maxHeight
增量到 rowCfg - heightByField 里,不知道是否可行,还得考虑到虚拟渲染
升级进行中,尽情期待
+1 求支持🙏 @xingwanying 请问下目前有计划排期开发么~
+1
希望可以能以当前列的数据的最大宽度作为列宽
目前 latest 版本已经支持, 设置为紧凑模式后, 列头会根据数值单元格对应文字的宽度 (采样前50列) 取值, see https://github.com/antvis/S2/pull/2392
文档有点欠缺, 近期补充.
const s2Options = {
width: 400,
height: 480,
style: {
layoutWidthType: 'compact',
},
};
自适应列高, 单元格支持换行
多行文本开发中, 2.0 版本支持 https://github.com/antvis/S2/pull/2383
#1564
resolved #2383