39488750 opened a new issue #15586: URL: https://github.com/apache/echarts/issues/15586
数据超过300左右柱 堆叠柱状图就不堆叠了
setOptions({
toolbox: {
top: 5,
right: 42,
itemSize: 12,
feature: {
dataZoom: {
show: false
},
saveAsImage: {
show: false
}
},
iconStyle: {
borderColor: '#7C92A6'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: 50,
right: 50,
bottom: 45
},
dataZoom: [
{
type: 'slider',
showDetail: false,
borderColor: '#fff',
fillerColor: 'rgba(57, 133, 191, 0.1)',
showDataShadow: false
}
],
xAxis: {
offset: 11,
data: data.categoryData,
silent: false,
splitLine: {
show: false
},
splitArea: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#999999'
}
},
axisTick: {
show: false
}
},
yAxis: [
{
min: 0,
max: max,
name: '讨论量 (文章数)',
splitLine: {
show: false
},
nameTextStyle: {
color: '#999999'
},
axisLine: {
lineStyle: {
color: '#999999'
}
}
},
{
type: 'value',
name: '负面占比 (%)',
min: 0,
max: 100,
interval: 25,
axisLabel: {
formatter: '{value}'
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: '#E9E9E9'
}
},
nameTextStyle: {
color: '#999999'
},
axisLine: {
lineStyle: {
color: '#999999'
}
}
}
],
// @ts-ignore
series: [
// @ts-ignore
{
name: '负面占比 (%)',
type: 'line',
symbol: 'none',
stack: 'total',
yAxisIndex: 1,
data: data.valueData.map(() => {
return 30;
}),
lineStyle: {
color: '#F28955',
type: 'dotted',
width: 1.5
}
},
{
name: '负面',
type: 'bar',
data: data.valueData,
stack: 'total',
large: true,
barWidth: 3,
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#F28955',
borderRadius: [2, 2, 0, 0]
},
markPoint: {
data: [
{
symbol: 'circle',
symbolSize: 14,
name: '某个坐标',
coord: [0, (data.valueData[0] as number) * 3.5],
value: 22,
itemStyle: {
color: '#F28955'
},
label: {
fontSize: 8,
color: '#fff'
}
},
{
symbol: 'circle',
symbolSize: 14,
name: '某个坐标',
coord: [1, (data.valueData[1] as number) * 3.5],
value: 22,
itemStyle: {
color: '#F28955'
},
label: {
fontSize: 8,
color: '#fff'
}
}
]
}
},
{
name: '中性',
type: 'bar',
data: data.valueData,
stack: 'total',
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#7C92A6',
borderRadius: [2, 2, 0, 0]
},
markPoint: {
data: [
{
symbol: 'circle',
symbolSize: 14,
name: '某个坐标',
coord: [5, (data.valueData[5] as number) * 3.5],
value: 14,
itemStyle: {
color: '#7C92A6'
},
label: {
fontSize: 8
}
}
]
}
},
{
name: '正面',
type: 'bar',
data: data.valueData,
stack: 'total',
emphasis: {
focus: 'series'
},
itemStyle: {
color: '#3985BF',
borderRadius: [2, 2, 0, 0]
},
markPoint: {
data: [
{
symbol: 'circle',
symbolSize: 14,
name: '某个坐标',
coord: [5, (data.valueData[5] as number) * 3.5],
value: 14,
itemStyle: {
color: '#3985BF'
},
label: {
fontSize: 8
}
}
]
}
}
]
});
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
