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

在S2单元格中绘制G2折线图,当单元格高度偏小时y坐标轴反转 #6290

Open
wyh888 opened this issue Jun 14, 2024 · 0 comments

Comments

@wyh888
Copy link

wyh888 commented Jun 14, 2024

问题描述

在S2单元格中绘制G2折线图,当单元格高度偏小时y坐标轴反转,可查看在s2中提的issue:antvis/S2#2773

image

重现链接

No response

重现步骤

  1. 在s2官网demohttps://s2.antv.antgroup.com/zh/examples/custom/custom-shape-and-chart#custom-g2-chart修改折线图配置如下:
     values: {
          type: 'line',
          autoFit: false,
          padding: 0,
          data: [
            { year: '1991', value: 3 },
            { year: '1992', value: 7 },
            { year: '1993', value: 3.5 },
            { year: '1994', value: 5 },
            { year: '1995', value: 14 },
            { year: '1996', value: 6 },
            { year: '1997', value: 7 },
            { year: '1998', value: 9 },
            { year: '1999', value: 13 },
          ],
          encode: {
            x: 'year',
            y: 'value',
            shape: 'smooth',
            color: '#1b6bba',
          },
          scale: {
            y: {
              nice: true,
              reverse: true,
            }
          },
          axis: false,
          labels: [],

        },
  1. 可修改dataCell的height为 100 与 30,进行对比:
image

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

image image

补充说明(可选)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant