-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update echarts-tooltip-carousel.js #13
base: master
Are you sure you want to change the base?
Conversation
支持dataset
@@ -121,12 +121,21 @@ | |||
let series = chartOption.series; | |||
let currSeries = series[seriesIndex]; | |||
if (!series || series.length === 0 || | |||
!currSeries || !currSeries.type || !currSeries.data || | |||
!currSeries.data.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这儿条件不能删,需要调整增加dataset的判断
chartType = currSeries.type; // 系列类型 | ||
dataLen = currSeries.data.length; // 某个系列的数据个数 | ||
|
||
if (currSeries.data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我看了下dataset相关文档,data存在则会忽略dataset,需要处理下优先级
} | ||
|
||
if (chartOption.dataset) { | ||
dataLen = chartOption.dataset.source.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看了下dataset的文档,判断dataLen的准确值比较麻烦,这里只是判断了最简单的,如果能完善下判断就更好了
感谢提交PR! |
支持dataset