Skip to content
New issue

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

🐛角头单元格垂直边线透明度或者宽度设置为0时不生效 #3014

Open
1 of 5 tasks
songlitao opened this issue Dec 4, 2024 · 2 comments
Open
1 of 5 tasks
Labels
🐛 bug 这个是一个 bug

Comments

@songlitao
Copy link

🏷 Version

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

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

交叉表配置角头单元格边线透明度为0,或者边线宽度为0,或者边线颜色为透明transparent,水平边线样式主题生效,垂直边线样式主题不生效。

image-20241204144157231

⌨️ Code Snapshots

import { PivotSheet, S2DataConfig, S2Options, S2Theme } from '@antv/s2';

fetch(
'https://render.alipay.com/p/yuyan/180020010001215413/s2/basic.json',
)
.then((res) => res.json())
.then(async (data) => {
const container = document.getElementById('container');
const s2DataConfig: S2DataConfig = {
fields: {
rows: ['province', 'city'],
columns: ['type'],
values: ['price', 'cost'],
},
meta: [
{ field: 'province', name: '省份', },
{ field: 'city', name: '城市', },
{ field: 'type', name: '商品类别', },
{ field: 'price', name: '价格', },
{ field: 'cost', name: '成本', },
],
data,
};

const s2Options: S2Options = {
  width: 600,
  height: 480,
};

const s2 = new PivotSheet(container, s2DataConfig, s2Options);

s2.setThemeCfg({
  name: 'colorful',
});

// 设置角头边线隐藏
const s2Theme: S2Theme = {
  cornerCell: {
    cell: {
      verticalBorderColorOpacity: 0,
      horizontalBorderColorOpacity: 0,
      verticalBorderWidth: 0,
      horizontalBorderWidth: 0,
      verticalBorderColor: 'transparent',
      horizontalBorderColor: 'transparent'
    },
  },
};
s2.setTheme(s2Theme);

await s2.render();

});

🔗 Reproduce Link

🤔 Steps to Reproduce

😊 Expected Behavior

😅 Current Behavior

💻 System information

Environment Info
System
Browser
@wjgogogo wjgogogo added the 🐛 bug 这个是一个 bug label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

你好 @songlitao,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @songlitao, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@xingxiang1227
Copy link

我开发过程中也遇到了这个问题,想实现自定义斜线角头,会显示一条竖线导致效果很难看,希望大佬们能尽快解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug
Projects
None yet
Development

No branches or pull requests

3 participants