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 { BidirectionalBar } from '@antv/g2plot';
export const data = [ { country: '乌拉圭', '2018': 13.4, '2017': 12.3 }, { country: '巴拉圭', '2018': 14.4, '2017': 6.3 }, { country: '南非', '2018': 18.4, '2017': 8.3 }, { country: '巴基斯坦', '2018': 34.4, '2017': 13.8 }, { country: '阿根廷', '2018': 44.4, '2017': 19.5 }, { country: '巴西', '2018': 24.4, '2017': 18.8 }, { country: '加拿大', '2018': 54.4, '2017': 24.7 }, { country: '中国', '2018': 104.4, '2017': 5.3 }, { country: '美国', '2018': 165.2, '2017': 72.9 }, ];
const BidirectionalBarPlot = new BidirectionalBar('container', { data, xField: 'country', xAxis: { position: 'bottom', }, appendPadding: [0, 30], interactions: [{ type: 'active-region' }], yField: ['2018', '2017'], tooltip: { shared: true, showMarkers: false, }, // 开启 label 展示 label: { // 默认居中, 'middle' position: 'right', // 默认为: 2 // offset: 4, }, });
BidirectionalBarPlot.render();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
import { BidirectionalBar } from '@antv/g2plot';
export const data = [
{ country: '乌拉圭', '2018': 13.4, '2017': 12.3 },
{ country: '巴拉圭', '2018': 14.4, '2017': 6.3 },
{ country: '南非', '2018': 18.4, '2017': 8.3 },
{ country: '巴基斯坦', '2018': 34.4, '2017': 13.8 },
{ country: '阿根廷', '2018': 44.4, '2017': 19.5 },
{ country: '巴西', '2018': 24.4, '2017': 18.8 },
{ country: '加拿大', '2018': 54.4, '2017': 24.7 },
{ country: '中国', '2018': 104.4, '2017': 5.3 },
{ country: '美国', '2018': 165.2, '2017': 72.9 },
];
const BidirectionalBarPlot = new BidirectionalBar('container', {
data,
xField: 'country',
xAxis: {
position: 'bottom',
},
appendPadding: [0, 30],
interactions: [{ type: 'active-region' }],
yField: ['2018', '2017'],
tooltip: {
shared: true,
showMarkers: false,
},
// 开启 label 展示
label: {
// 默认居中, 'middle'
position: 'right',
// 默认为: 2
// offset: 4,
},
});
BidirectionalBarPlot.render();
The text was updated successfully, but these errors were encountered: