Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((data) => {
const columnPlot = new GroupColumn(document.getElementById('container'), {
title: {
visible: true,
text: '分组柱状图-缩略轴',
},
description: {
visible: true,
text: '缩略轴 (slider) 交互适用于数据较多,用户希望关注数据集中某个特殊区间的场景。',
},
forceFit: true,
data,
xField: '城市',
yField: '销售额',
groupField: '细分',
xAxis: {
visible: true,
autoHideLabel: true,
月份: 'Jun.',
月均降雨量: 35.5,
},
{
name: 'Berlin',
月份: 'Jul.',
月均降雨量: 37.4,
},
{
name: 'Berlin',
月份: 'Aug.',
月均降雨量: 42.4,
},
];
const columnPlot = new GroupColumn(document.getElementById('container'), {
title: {
visible: true,
text: '分组柱状图',
},
forceFit: true,
data,
xField: '月份',
yField: '月均降雨量',
yAxis: {
min: 0,
},
label: {
visible: true,
},
groupField: 'name',
});