I trying to create two series on single chart: Line and Bars. Line and Bars have same values by Y, but Bars should be reversed by X, and should have different X values. I do not understand how to make bars horizontal in this case. Please see the example picture bellow: Echarts draws vertical bars (green) but I need horizontal (I've draw them as Red on picture). And here is the code:
option = {
xAxis: [{
data: ['2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27', '2017-10-28']
}, {
inverse: true,
type: 'value'
}],
yAxis: [{
}, {
type: 'value'
}],
series: [
{
xAxisIndex: 0,
yAxisIndex: 0,
type: 'line',
data: [
10, 15, 10, 20, 15
]
},
{
xAxisIndex: 1,
yAxisIndex: 0,
type: 'bar',
barWidth: 5,
data: [[120,30], [300, 20]]
}
]
};