You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "fssh (via GitHub)" <gi...@apache.org> on 2023/08/08 01:09:59 UTC
[GitHub] [echarts] fssh commented on issue #18967: [Feature] 请问legend可以分别设置水平和垂直的间隔吗
fssh commented on issue #18967:
URL: https://github.com/apache/echarts/issues/18967#issuecomment-1668765651
> > But after testing, it is found that changing this value will change the horizontal and vertical intervals at the same time.
>
> Could you provide your test code? Our [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeBYAULWBjYAbYATgFywDaARAMQAM1AzHQGyPkA0sVtzAnN2x5QAsWAIYAjLAFN-VSQFY6AJjrSAuq3SYAJiLAiAzpLAlUGTLH3AArgSklSm85gpgAniGntyi6gEZFMj6-dIF-gqG-chEs6o5OFABihJL6YPxK1OwMill-WXSCWdzUsWbx5ADKYJIgHvyKPuy-ABw5sL7cvuzKhbCKxaVOzuQAIimSBGlNcpl9St157XK9HSUaZeYUAOpGuCLQWvzczewA7KdNi7zsgiVxsKqOAL7rmLiSAOaSByb3hBDfYywADkADcJpBRLhgewINUALYAcREIBIgnuAHoMf9ASRgQALf4ALxgemhsIRyNRfXRZhejgAHgBBBkQfS_DZuDwkciiaofQiucjPV6wVwstkmelmQwEAHssimJxcyQ8sQiAhse6y-UAGRErmsYAAQq4eQRgAB3YV09hK8wqtUarUbHUpfWGqwms0cC3WkXIe6OjjqzWizBu_Qeo2m81Wm2YF6BznuVUh53hiwTPUGmM-8h-hOwJ6PNBPIA) shows correct spacing for the two [orient](https://echarts.apache.org/en/option.html#legend.orient) options - horizontal' and 'vertical'.
```javascript
option = {
dataset: {
source: [
["type", "2012", "2013", "2014", "2015", "2016"],
["Forest", 320, 332, 301, 334, 390],
["Steppe", 220, 182, 191, 234, 290],
["Desert", 150, 232, 201, 154, 190],
["Wetland", 98, 77, 101, 99, 40],
["AAAAAAA", 98, 77, 101, 99, 40],
["BBBBBBB", 98, 77, 101, 99, 40],
["CCCCCCC", 98, 77, 101, 99, 40],
["DDDDDDD", 98, 77, 101, 99, 40],
["EEEEEEE", 98, 77, 101, 99, 40],
["FFFFFFF", 98, 77, 101, 99, 40],
["GGGGGGG", 98, 77, 101, 99, 40],
["HHHHHHH", 98, 77, 101, 99, 40],
["IIIIIII", 98, 77, 101, 99, 40],
["JJJJJJJ", 98, 77, 101, 99, 40],
["KKKKKKK", 98, 77, 101, 99, 40],
]
},
legend: {
orient: 'horizontal',
itemGap: 50,
},
xAxis: {
type: "category"
},
yAxis: {},
series: [{
type: "bar",
seriesLayoutBy: "row"
}, {
type: "bar",
seriesLayoutBy: "row"
}, {
type: "bar",
seriesLayoutBy: "row"
}, {
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},{
type: "bar",
seriesLayoutBy: "row"
},
]
}
```

--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org