Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用dataset时,无法设置2个Y轴各自的最大值 #9104

Closed
xmwgp8 opened this issue Sep 20, 2018 · 1 comment
Closed

使用dataset时,无法设置2个Y轴各自的最大值 #9104

xmwgp8 opened this issue Sep 20, 2018 · 1 comment

Comments

@xmwgp8
Copy link

xmwgp8 commented Sep 20, 2018

One-line summary [问题简述]

就在官方示例的数据调整:

option = {
legend: {},
tooltip: {},
dataset: {
source: [
['product', '2015', '2016'],
['Matcha Latte', 43.3, 1185.8],
['Milk Tea', 83.1, 1173.4],
['Cheese Cocoa', 86.4, 1165.2],
['Walnut Brownie', 72.4, 1153.9]
]
},
xAxis: {type: 'category'},
yAxis: [{name:'2015',
type:'value',
max: function(value) {
return value.max;
}
},
{name:'2016',
type:'value',
max: function(value) {
return value.max ;
}}],
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [
{type: 'bar'},
{type: 'line'}
]
};

Expected behaviour [期望结果]

2个Y轴根据各自序列的最大值显示。

@xmwgp8
Copy link
Author

xmwgp8 commented Sep 20, 2018

OK.
series: [
{type: 'bar'},
{type: 'line',yAxisIndex: 1}
]

@xmwgp8 xmwgp8 closed this as completed Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant