gpt4 book ai didi

javascript - echarts legend.itemGap 仅适用于 gulp browser-sync

转载 作者:行者123 更新时间:2023-11-29 23:46:54 26 4
gpt4 key购买 nike

我想减少图例中元素之间的差距。我正在使用 browser-sync 并且在我使用它的时候它可以工作但是然后我关闭 browser-sync 并打开同一个 webapp 但它似乎不起作用。这是我使用浏览器同步的图表 my graph using browser-sync

这是关闭browrser-sync后的图

my graph without browser-sync

这是我的 Echart 选项:

option ={
title: {
text: 'Ejercicios realizados por el paciente',
left: 'center'
},
tooltip : {
trigger: 'item'
},
toolbox: {
show : true,
/*orient: 'vertical',*/
showTitle: true,
feature : {
mark : {show: true},
/*magicType: {
show: true,
type: ['line', 'bar', 'stack'],
title: {
line: 'linea',
bar: 'barras',
stack: 'barras apiladas'
}
},
restore : {
show: true,
title: 'restaurar'
},*/
saveAsImage : {
show: true,
title: 'captura'
}
}
},
calculable : true,
legend: {
orient: 'vertical',
align: 'left',
top: '7%',
right: '1%',
left: /*'right'*/'80%',
width: '27%',
data:[],
itemGap: 4,
itemHeight: 7,
itemWidth: 15,
padding: 1,
//backgroundColor: 'rgba(0, 0, 0, 0.1)'
},
xAxis: [
{
type : 'category',
data: timeData,
//boundaryGap: ['20%', '40%']
}
],
yAxis: {
type: 'value',
name: 'N. veces',
offset: 0,
nameRotate: 0,
fontSize: 12,
},
dataZoom: [{
type: 'inside',
start: 85,
end: 100
}, {
start: 0,
end: 10,
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '100%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.8)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '1%'
}],
grid: {
//top: 110,
left: '4%',
right: '19%',
//height: 160,
width: '76%',
containLabel: false,
},
series: [],
color: ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3', '#ff0065', '#71167a', '#fbe562', '#08331d', '#ADFF2F', '#cb6c00', '#421c25', '#25365c', '#8FBC8F', '#4169E1', '#FF4500']
}

我错过了什么吗?请帮忙

最佳答案

会尝试更改图例选项的值,itemGap: 4, itemHeight: 7, itemWidth: 15。通过这些设置,您将能够使其适应您想要运行它的环境

关于javascript - echarts legend.itemGap 仅适用于 gulp browser-sync,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43652504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com