antvis/G2

The issue has been closed
折线图某些数据在屏宽1400px左右范围渲染异常 #3718
ckvv posted onGitHub
-
I have searched the issues of this repository and believe that this is not a duplicate.
出现问题发生在mac pro 全屏状态
似乎和数据本身还有屏幕宽高都有关联
Reproduction
https://codepen.io/chenkai0520/full/OJjGEQK
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>折线图-issue</title>
</head>
<body>
<div id="container" style="width: 1079px; height: 312px;"></div>
<script src="https://gw.alipayobjects.com/os/lib/antv/g2/4.1.32/dist/g2.min.js"></script>
<script>
const data = [{
date: '2021-11-19',
value: 995.023
},
{
date: '2021-11-18',
value: 1021.899
},
{
date: '2021-11-17',
value: 948.366
},
{
date: '2021-11-16',
value: 947.162
},
{
date: '2021-11-15',
value: 1003.01
},
{
date: '2021-11-14',
value: 1072.513
},
{
date: '2021-11-13',
value: 1164.065
}
];
const chart = new G2.Chart({
container: 'container',
autoFit: true,
});
chart.data(data);
chart.scale({
date: {
range: [0, 1],
},
value: {
min: 0,
nice: true,
},
});
chart.tooltip({
showCrosshairs: true, // 展示 Tooltip 辅助线
shared: true,
});
chart.line().position('date*value').label('value');
chart.point().position('date*value');
chart.render();
</script>
</body>
</html>
<img width="1123" alt="截屏2021-11-22 下午2 03 54" src="https://user-images.githubusercontent.com/30174970/142808811-42cb3447-4c00-4a58-a842-5cba2ecbc01d.png">
Environment | Info |
---|---|
g2 | 4.1.34 |
System | MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports) |
Browser | Google Chrome 版本 95.0.4638.69(正式版本) (x86_64) |