Replies: 1 comment
-
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
theme: 'classic',
autoFit: true,
});
chart
.interval()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
})
.encode('x', 'letter')
.encode('y', 'frequency')
.scale('y', { range: [0, 1] }) // 👈
.axis('y', { labelFormatter: '.0%' });
chart.render(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
KuduroJS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
比如,正常y轴:
y轴逆序:
Beta Was this translation helpful? Give feedback.
All reactions