We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
官网demohttps://s2.antv.antgroup.com/zh/examples/custom/custom-shape-and-chart#custom-g2-chart, 当单元格高度是30,绘制折线图坐标轴反转,如图:
在官网示例中修改折线图配置如下:
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: [], },
可修改dataCell的height为 100 与 30,进行对比:
The text was updated successfully, but these errors were encountered:
S2 只是提供渲染容器, 然后会将单元格的高度作为图表的高度, 其他未做处理, 这个看起来是 G2 的问题, 还请在 G2 那边提一个 issue.
S2/packages/s2-core/src/cell/data-cell.ts
Lines 105 to 116 in 0ca8413
height: 30
height: 100
Sorry, something went wrong.
No branches or pull requests
🏷 Version
Sheet Type
🖋 Description
官网demohttps://s2.antv.antgroup.com/zh/examples/custom/custom-shape-and-chart#custom-g2-chart, 当单元格高度是30,绘制折线图坐标轴反转,如图:
⌨️ Code Snapshots
在官网示例中修改折线图配置如下:
可修改dataCell的height为 100 与 30,进行对比:
🔗 Reproduce Link
🤔 Steps to Reproduce
😊 Expected Behavior
😅 Current Behavior
💻 System information
The text was updated successfully, but these errors were encountered: