I am using G2Plot by Ant Design with React, and the JS charts cannot be correctly rendered in the latest beta.
-
The issue can be reproduced on macOS, iPadOS, and iOS.
-
The issue cannot be reproduced on other browsers on macOS (all browsers use Safari WebKit on iOS) or Safari 14.
This issue can be reproduced by visiting https://g2plot.antv.vision/en/examples/line/basic#line
, and you will see the charts not being rendered (sometimes cause the whole Safari application glitch).
You may refer to the below code:
import { Line } from '@antv/g2plot';
fetch('https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38ccf184.json')
.then((res) => res.json())
.then((data) => {
const line = new Line('container', {
data,
padding: 'auto',
xField: 'Date',
yField: 'scales',
xAxis: {
tickCount: 5,
},
slider: {
start: 0.1,
end: 0.5,
},
});
line.render();
});
This issue has existed since the first release of Safari 15 Beta.
Thoughts? Solutions? Workarounds?
Your time and comments are much appreciated.
For ones who are not familiar with G2Plot, please refer to:
https://github.com/antvis/G2Plot
https://g2plot.antv.vision