266 Star 1.8K Fork 323

GVPuCharts / uCharts

Merged
!11 修复K线图第一条tooltip点击报错

baoyh:master uCharts:master

baoyh Created on: 2020-04-09 14:53
Reviewer: 1316944 cc qiun 1578948788   Tester: 1316944 cc qiun 1578948788

相关的Issue

K线图第一条点击弹出tooltip报错

原因(目的、解决的问题等)

源码606行判断语句if (index == 0 && item.data[1] - item.data[0] < 0)中,当数据中item.data[1]大于等于item.data[0]时,走入下面判断取series[index - 1]即series[-1]为undefined报错

描述(做了什么,变更了什么)

补充了判断逻辑为:
if (index == 0) {
if(item.data[1] - item.data[0] < 0){
color[1] = downColor;
}else{
color[1] = upColor;
}
}

测试用例

2 comments, 2 participants 1316944 cc qiun 1578948788

Show action logs Hide action logs
16cheng merged Pull Request 2020-04-09 18:46
16cheng test passed 2020-04-09 18:45
16cheng check passed 2020-04-09 18:45
baoyh assigned tester 16cheng 2020-04-09 14:53
baoyh assigned reviewer 16cheng 2020-04-09 14:53
JavaScript
1
https://git.oschina.net/uCharts/uCharts.git
git@git.oschina.net:uCharts/uCharts.git
uCharts
uCharts
uCharts

Search