Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
fe902cb0
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,发现更多精彩内容 >>
提交
fe902cb0
编写于
7月 05, 2019
作者:
J
jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 6179
上级
0f7c9b23
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
481 addition
and
18 deletion
+481
-18
umychart_python/.vscode/launch.json
umychart_python/.vscode/launch.json
+1
-1
umychart_python/__init__.py
umychart_python/__init__.py
+1
-1
umychart_python/umychart_complier_data.py
umychart_python/umychart_complier_data.py
+34
-1
umychart_python/umychart_complier_jscomplier.py
umychart_python/umychart_complier_jscomplier.py
+2
-0
umychart_python/umychart_complier_jsexecute.py
umychart_python/umychart_complier_jsexecute.py
+7
-7
umychart_python/umychart_complier_jsparser.py
umychart_python/umychart_complier_jsparser.py
+2
-2
umychart_python/umychart_complier_jssymboldata.py
umychart_python/umychart_complier_jssymboldata.py
+420
-1
umychart_python/umychart_complier_testcase.py
umychart_python/umychart_complier_testcase.py
+11
-2
vuehqchart/src/jscommon/umychart.complier.js
vuehqchart/src/jscommon/umychart.complier.js
+1
-1
webhqchart.demo/jscommon/umychart.complier.js
webhqchart.demo/jscommon/umychart.complier.js
+1
-1
webhqchart/umychart.complier.js
webhqchart/umychart.complier.js
+1
-1
未找到文件。
umychart_python/.vscode/launch.json
浏览文件 @
fe902cb0
...
...
@@ -8,7 +8,7 @@
"name"
:
"Python: Test Case"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"program"
:
"${workspaceRoot}
/
umychart_complier_testcase.py"
,
"program"
:
"${workspaceRoot}
\\
umychart_complier_testcase.py"
,
"console"
:
"integratedTerminal"
}
]
...
...
umychart_python/__init__.py
浏览文件 @
fe902cb0
version
=
'1.0.1'
__version__
=
(
1
,
0
,
1
)
from
umychart.python
import
*
\ No newline at end of file
from
umychart_python
import
*
\ No newline at end of file
umychart_python/umychart_complier_data.py
浏览文件 @
fe902cb0
...
...
@@ -654,7 +654,7 @@ class ChartData:
i
,
j
=
0
,
0
while
i
<
dataLen
:
date
=
self
.
Data
[
i
].
Date
if
j
>=
overlayData
.
length
:
if
j
>=
len
(
overlayData
)
:
i
+=
1
continue
...
...
@@ -677,4 +677,37 @@ class ChartData:
return
result
# 缺省数据使用 emptyValue填充
def
GetFittingData2
(
self
,
overlayData
,
defaultValue
)
:
dataLen
=
len
(
self
.
Data
)
result
=
JSComplierHelper
.
CreateArray
(
dataLen
)
i
,
j
=
0
,
0
while
i
<
dataLen
:
date
=
self
.
Data
[
i
].
Date
if
j
>=
len
(
overlayData
)
:
result
[
i
]
=
SingleData
()
result
[
i
].
Date
=
date
result
[
i
].
Value
=
defaultValue
i
+=
1
continue
overlayDate
=
overlayData
[
j
].
Date
if
overlayDate
==
date
:
item
=
SingleData
()
item
.
Date
=
overlayData
[
j
].
Date
item
.
Value
=
overlayData
[
j
].
Value
result
[
i
]
=
item
j
+=
1
i
+=
1
elif
overlayDate
<
date
:
j
+=
1
else
:
result
[
i
]
=
SingleData
()
result
[
i
].
Date
=
date
result
[
i
].
Value
=
defaultValue
i
+=
1
return
result
umychart_python/umychart_complier_jscomplier.py
浏览文件 @
fe902cb0
...
...
@@ -52,6 +52,7 @@ class JSComplier:
execute
.
JobList
=
parser
.
Node
.
GetDataJobList
()
result
=
execute
.
Execute
()
print
(
'[JSComplier.Execute] execute finish.'
)
return
result
@
staticmethod
# 修改API地址
...
...
@@ -96,6 +97,7 @@ class ScriptIndexConsole:
execute
.
JobList
=
parser
.
Node
.
GetDataJobList
()
result
=
Variant
()
result
.
Stock
=
Variant
()
result
.
Error
=
None
result
.
OutVar
=
execute
.
Execute
()
print
(
'[ScriptIndexConsole.ExecuteScript] execute finish.'
)
...
...
umychart_python/umychart_complier_jsexecute.py
浏览文件 @
fe902cb0
...
...
@@ -190,13 +190,13 @@ class JSExecute :
stick
=
True
elif
(
value
==
'VOLSTICK'
)
:
volStick
=
True
elif
(
value
.
indexOf
(
'COLOR'
)
==
0
)
:
color
=
Tr
ue
elif
(
value
.
indexOf
(
'LINETHICK'
)
==
0
)
:
lineWidth
=
Tr
ue
elif
(
value
.
indexOf
(
'NODRAW'
)
==
0
)
:
elif
(
value
.
find
(
'COLOR'
)
==
0
)
:
color
=
val
ue
elif
(
value
.
find
(
'LINETHICK'
)
==
0
)
:
lineWidth
=
val
ue
elif
(
value
.
find
(
'NODRAW'
)
==
0
)
:
isShow
=
False
elif
(
value
.
indexOf
(
'EXDATA'
)
==
0
)
:
elif
(
value
.
find
(
'EXDATA'
)
==
0
)
:
isExData
=
True
# 扩展数据, 不显示再图形里面
elif
(
itemExpression
.
Type
==
Syntax
.
Literal
)
:
#常量
...
...
@@ -373,7 +373,7 @@ class JSExecute :
elif
funcName
==
'FINANCE'
:
node
.
Out
=
self
.
SymbolData
.
GetFinanceCacheData
(
args
[
0
],
node
)
elif
funcName
==
"MARGIN"
:
node
.
Out
=
self
.
SymbolData
.
GetMarginCacheData
(
args
[
0
]
,
node
)
node
.
Out
=
self
.
SymbolData
.
GetMarginCacheData
(
int
(
args
[
0
])
,
node
)
elif
funcName
==
"HK2SHSZ"
:
node
.
Out
=
self
.
SymbolData
.
GetHKToSHSZCacheData
(
args
[
0
],
node
)
elif
funcName
==
"NEWS"
:
...
...
umychart_python/umychart_complier_jsparser.py
浏览文件 @
fe902cb0
...
...
@@ -709,9 +709,9 @@ class JSParser:
self
.
Context
.
IsBindingElement
=
False
expr
=
self
.
InheritCoverGrammar
(
self
.
ParseGroupExpression
)
else
:
expr
=
self
.
ThrowUnexpectedToken
(
self
.
NextToken
())
self
.
ThrowUnexpectedToken
(
self
.
NextToken
())
else
:
expr
=
self
.
ThrowUnexpectedToken
(
self
.
NextToken
())
self
.
ThrowUnexpectedToken
(
self
.
NextToken
())
return
expr
...
...
umychart_python/umychart_complier_jssymboldata.py
浏览文件 @
fe902cb0
此差异已折叠。
点击以展开。
umychart_python/umychart_complier_testcase.py
浏览文件 @
fe902cb0
import
sys
from
umychart_complier_jscomplier
import
JSComplier
,
SymbolOption
,
HQ_DATA_TYPE
from
umychart_complier_jscomplier
import
ScriptIndexConsole
,
ScriptIndexItem
,
SymbolOption
,
RequestOption
,
HQ_DATA_TYPE
,
ArgumentItem
class
TestCase
:
...
...
@@ -246,6 +245,12 @@ def Test_FINANCE(): # 财务数据测试
'SAR(10,2,20);'
,
'BACKSET(CLOSE>OPEN,2);'
,
'TT:DYNAINFO(13);'
,
'T2:MARGIN(1);'
,
'T5:MARGIN(6);'
,
"上涨家数:UPCOUNT('CNA.CI'),COLORRED;"
,
"下跌家数:DOWNCOUNT('CNA.CI'),COLORGREEN;"
,
"TTTT:NEWS(2)+NEWS(4);"
,
"TTT2:NEWS(1);"
,
])
result
=
case
.
Run
()
...
...
@@ -268,7 +273,11 @@ def Test_ScriptIndexConsole():
right
=
1
,
# 复权 0 不复权 1 前复权 2 后复权
period
=
5
# 周期 0=日线 1=周线 2=月线 3=年线 4=1分钟 5=5分钟 6=15分钟 7=30分钟 8=60分钟
)
indexConsole
.
ExecuteScript
(
option
)
result
=
indexConsole
.
ExecuteScript
(
option
)
if
not
result
.
Error
:
print
(
'run successfully.'
)
...
...
vuehqchart/src/jscommon/umychart.complier.js
浏览文件 @
fe902cb0
...
...
@@ -6766,7 +6766,7 @@ function JSSymbolData(ast,option,jsExecute)
for
(
let
i
in
allData
)
{
let
aryFixedData
=
this
.
Data
.
GetFittingData
(
allData
[
i
].
Data
);
let
aryFixedData
=
this
.
Source
Data
.
GetFittingData
(
allData
[
i
].
Data
);
var
bindData
=
new
ChartData
();
bindData
.
Data
=
aryFixedData
;
...
...
webhqchart.demo/jscommon/umychart.complier.js
浏览文件 @
fe902cb0
...
...
@@ -6766,7 +6766,7 @@ function JSSymbolData(ast,option,jsExecute)
for
(
let
i
in
allData
)
{
let
aryFixedData
=
this
.
Data
.
GetFittingData
(
allData
[
i
].
Data
);
let
aryFixedData
=
this
.
Source
Data
.
GetFittingData
(
allData
[
i
].
Data
);
var
bindData
=
new
ChartData
();
bindData
.
Data
=
aryFixedData
;
...
...
webhqchart/umychart.complier.js
浏览文件 @
fe902cb0
...
...
@@ -6766,7 +6766,7 @@ function JSSymbolData(ast,option,jsExecute)
for
(
let
i
in
allData
)
{
let
aryFixedData
=
this
.
Data
.
GetFittingData
(
allData
[
i
].
Data
);
let
aryFixedData
=
this
.
Source
Data
.
GetFittingData
(
allData
[
i
].
Data
);
var
bindData
=
new
ChartData
();
bindData
.
Data
=
aryFixedData
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录