You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/09/17 05:09:41 UTC
[incubator-echarts] branch line-optimize updated: time: return
directly if parsing val is a timestamp.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch line-optimize
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/line-optimize by this push:
new 9b991a4 time: return directly if parsing val is a timestamp.
9b991a4 is described below
commit 9b991a418a8f0ecad3a40b15fa9be4a57adc43b1
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Sep 17 13:08:36 2020 +0800
time: return directly if parsing val is a timestamp.
---
src/scale/Time.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scale/Time.ts b/src/scale/Time.ts
index 3080b67..70eb9a9 100644
--- a/src/scale/Time.ts
+++ b/src/scale/Time.ts
@@ -232,7 +232,7 @@ class TimeScale extends IntervalScale {
parse(val: number | string | Date): number {
// val might be float.
- return +numberUtil.parseDate(val);
+ return typeof val === 'number' ? val : +numberUtil.parseDate(val);
}
contain(val: number): boolean {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org