antvis / S2

⚡️ A practical visualization library for tabular analysis.

Home Page:https://s2.antv.antgroup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🙏S2表格values能否增加可以设置的下划线标识,以便于客户识别下钻?

Zhaohanqi12 opened this issue · comments

🏷 Version

Package Version
@antv/s2 next
@antv/s2-react next
@antv/s2-vue

Sheet Type

  • [√ ] PivotSheet
  • [√ ] TableSheet

🖋 Description

🏞 What problem does this feature solve

image

是指链接跳转s2DataConfig.fields.values 生效?, 如果是的话, 目前是支持的 https://s2.antv.antgroup.com/zh/examples/interaction/advanced/#table-link-jump

还是只是想在文本下面增加一个下划线? 如果是的话, 自定义单元格 自行绘制一个下划线 (Line) 即可

if (textStyle.textAlign === 'center') {
startX -= actualTextWidth / 2;
} else if (textStyle.textAlign === 'right') {
startX -= actualTextWidth;
}
const { bottom: maxY } = this.textShape.getBBox();
this.linkFieldShape = renderLine(this, {
x1: startX,
y1: maxY + 1,
// 不用 bbox 的 maxX,因为 g-base 文字宽度预估偏差较大
x2: startX + actualTextWidth,
y2: maxY + 1,
stroke: linkFillColor,
lineWidth: 1,
});
}