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

Update echarts-tooltip-carousel.js #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wanghongrui
Copy link

支持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) {
Copy link
Owner

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) {
Copy link
Owner

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
Copy link
Owner

@chengwb53 chengwb53 Oct 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看了下dataset的文档,判断dataLen的准确值比较麻烦,这里只是判断了最简单的,如果能完善下判断就更好了

@chengwb53
Copy link
Owner

感谢提交PR!

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

Successfully merging this pull request may close these issues.

None yet

2 participants