You have to set legend with series name.
```js
option = {
legend: {
data: ['a', 'b']
},
dataset: [{
source: [
['Test1', 10],
['Test2', 20]
],
dimensions: ['Category', 'Value']
},
{
source: [
['Test1', 15],
['Test2', 25]
],
dimensions: ['Category', 'Value2']
}],
xAxis: [{ type: 'category' }, { type: 'category' }],
yAxis: [{ position: 'left' }, { position: 'right' }],
series: [
{
name: 'a',
type: 'line',
encode: {
x: 'Category',
y: 'Value'
},
datasetIndex: 0,
yAxisIndex: 0
},
{
name: 'b',
type: 'line',
encode: {
x: 'Category',
y: 'Value2'
},
datasetIndex: 1,
yAxisIndex: 1
}
],
color: ["#c22e34", "#e7b603", "#0097da", "#2b821e", "#035daa", "#339ca8"]
};
```
[ Full content available at:
https://github.com/apache/incubator-echarts/issues/9151 ]
This message was relayed via gitbox.apache.org for [email protected]