Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
4f41f586
hqchart
项目概览
bluefrankey
/
hqchart
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
hqchart
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4f41f586
编写于
9月 24, 2020
作者:
HQChart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 8849
8849 小程序 增加INTPART(), TIME 函数
上级
b8680485
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
47 addition
and
2 deletion
+47
-2
wechathqchart/umychart.complier.wechat.js
wechathqchart/umychart.complier.wechat.js
+47
-2
未找到文件。
wechathqchart/umychart.complier.wechat.js
浏览文件 @
4f41f586
...
...
@@ -5078,6 +5078,30 @@ function JSAlgorithm(errorHandler, symbolData)
return
result
;
}
//取整.
//用法: INTPART(A)返回沿A绝对值减小方向最接近的整数
//例如:INTPART(12.3)求得12,INTPART(-3.5)求得-3
this
.
INTPART
=
function
(
data
)
{
var
result
=
null
;
if
(
Array
.
isArray
(
data
))
{
result
=
[];
for
(
var
i
in
data
)
{
var
item
=
data
[
i
];
if
(
this
.
IsNumber
(
item
))
result
[
i
]
=
parseInt
(
item
);
else
result
[
i
]
=
null
;
}
}
else
if
(
this
.
IsNumber
(
data
))
{
result
=
parseInt
(
data
);
}
return
result
;
}
//函数调用
this
.
CallFunction
=
function
(
name
,
args
,
node
)
{
...
...
@@ -5217,7 +5241,9 @@ function JSAlgorithm(errorHandler, symbolData)
case
'
FRACPART
'
:
return
this
.
FRACPART
(
args
[
0
]);
case
'
BARSLASTCOUNT
'
:
return
this
.
BARSLASTCOUNT
(
args
[
0
]);
return
this
.
BARSLASTCOUNT
(
args
[
0
]);
case
'
INTPART
'
:
return
this
.
INTPART
(
args
[
0
]);
//三角函数
case
'
ATAN
'
:
return
this
.
Trigonometric
(
args
[
0
],
Math
.
atan
);
...
...
@@ -7500,6 +7526,23 @@ function JSSymbolData(ast,option,jsExecute)
return
result
;
}
this
.
TIME
=
function
()
{
var
result
=
[];
if
(
!
this
.
Data
||
!
this
.
Data
.
Data
||
!
this
.
Data
.
Data
.
length
)
return
result
;
for
(
let
i
in
this
.
Data
.
Data
)
{
var
item
=
this
.
Data
.
Data
[
i
];
if
(
this
.
IsNumber
(
item
.
Time
))
result
[
i
]
=
item
.
Time
;
else
result
[
i
]
=
0
;
}
return
result
;
}
this
.
DATE
=
function
()
{
var
result
=
[];
...
...
@@ -7843,7 +7886,7 @@ function JSExecute(ast,option)
[
'
C
'
,
null
],
[
'
V
'
,
null
],
[
'
O
'
,
null
],
[
'
H
'
,
null
],
[
'
L
'
,
null
],
[
'
VOLR
'
,
null
],
//日期类
[
'
DATE
'
,
null
],
[
'
YEAR
'
,
null
],
[
'
MONTH
'
,
null
],
[
'
PERIOD
'
,
null
],
[
'
WEEK
'
,
null
],
[
'
DATE
'
,
null
],
[
'
YEAR
'
,
null
],
[
'
MONTH
'
,
null
],
[
'
PERIOD
'
,
null
],
[
'
WEEK
'
,
null
],
[
"
TIME
"
,
null
],
//大盘数据
[
'
INDEXA
'
,
null
],[
'
INDEXC
'
,
null
],[
'
INDEXH
'
,
null
],[
'
INDEXL
'
,
null
],[
'
INDEXO
'
,
null
],[
'
INDEXV
'
,
null
],
...
...
@@ -8012,6 +8055,8 @@ function JSExecute(ast,option)
case
'
GNBLOCK
'
:
return
this
.
SymbolData
.
GetConcept
();
case
'
TIME
'
:
return
this
.
SymbolData
.
TIME
();
case
'
DATE
'
:
return
this
.
SymbolData
.
DATE
();
case
'
YEAR
'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录