这是我目前拥有的,我想得到所有的标签[-300000,-1500000,0,150000,300000].所以请提供一些帮助.任何建议都很感激.我很期待
const series = [
{
name: 'Males',
data: [120000, 50000, 10000, 120000, 50000, 10000],
},
{
name: 'Females',
data: [-200000, -151000, -70000, -250000, -151000, -70000],
},
];
const options = {
chart: {
id: 'horizontal-bar',
stacked: true,
toolbar: {
show: false,
},
},
colors: ['#68D241', '#FF0D35'],
plotOptions: {
bar: {
horizontal: true,
barHeight: '60%',
borderRadius: 5,
borderRadiusWhenStacked: 'all' as const,
},
},
dataLabels: {
enabled: false,
},
stroke: {
width: 1,
colors: ['#fff'],
},
legend: {
show: false,
},
grid: {
xaxis: {
lines: {
show: true,
},
},
yaxis: {
lines: {
show: false,
},
},
},
xaxis: {
categories: ['TRUE ICP', 'AC 03', 'AC 04', 'AC 05', 'AC 06', 'IC 02'],
tickAmount: 4,
labels: {
formatter(val: string) {
const formattedValue = `$${Math.abs(parseFloat(val)).toLocaleString()}`;
return parseFloat(val) < 0 ? `-${formattedValue}` : formattedValue;
},
},
axisBorder: {
show: false,
},
},
yaxis: {
min: -300000,
max: 300000,
showAlways: true,
},
};
我试图得到所有的标签,但我看不到负面的标签
我试图得到所有的标签,包括最小和最大的一个.然而,它没有显示出来,我遇到了这个github错误请求apexCharts和修复被添加here