What I'm trying to do is set a splitLine under the label when the label it's not an empty string:
When there's more than one value different from empty string it has the desired behavior: both splitLines are under the label
But when there's only one value not empty, the splitLine is not showing, it appears to be aligning to the left side of the chart only one not empty value
This is my code:
option = {
xAxis: {
type: 'category',
position: 'top',
data: ['', '', '', 'aaa', 'bbb'],
splitLine: {
show: true,
interval: function(index, value) {
return value != '';
}
}
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 147, 260],
type: 'line'
}
]
}
Im expecting to have a splitLine under the label always
UPDATE: This is a bug see here
Seems to be a bug. You could do something like this to force that there is always 2 splitlines if it fits your use case: