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
import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', autoFit: true, }); chart .data([ { Day: 1, Value: 54.8 }, { Day: 2, Value: 112.1 }, { Day: 3, Value: 63.6 }, { Day: 4, Value: 37.6 }, { Day: 5, Value: 79.7 }, { Day: 6, Value: 137.9 }, { Day: 7, Value: 120.1 }, { Day: 8, Value: 103.3 }, { Day: 9, Value: 294.8 }, { Day: 10, Value: 199.5 }, { Day: 11, Value: 72.3 }, { Day: 12, Value: 51.1 }, { Day: 13, Value: 112.0 }, { Day: 14, Value: 174.5 }, { Day: 15, Value: 130.5 }, ]) .axis('y', { title: false }); chart.interval() .encode('x', 'Day') .encode('y', 'Value') .scrollbar('x', { ratio: 0.5, values: [0, 1], }) chart .lineY() .data([300]) .style('stroke', '#F4664A') .label({ text: 'hazardous', position: 'left', textBaseline: 'bottom', fill: '#F4664A', background: true, backgroundFill: '#F4664A', backgroundOpacity: 0.25, }) .scrollbar('x', false); chart.render();
No response
🆕 5.x
The text was updated successfully, but these errors were encountered:
看了一下应该是滚动之后图表的主区域高度计算没有算上text的高度,导致text被遮挡。 可以先配置一下图表上方呼吸范围的大小
{ insetTop: 50 }
Sorry, something went wrong.
No branches or pull requests
Describe the bug / 问题描述
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
🆕 5.x
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: