Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
208f5e55
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 搜索 >>
提交
208f5e55
编写于
10月 12, 2018
作者:
J
jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 3105
上级
2df55ec3
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
440 addition
and
339 deletion
+440
-339
webhqchart/umychart.complier.js
webhqchart/umychart.complier.js
+4
-1
webhqchart/umychart.js
webhqchart/umychart.js
+68
-10
wechathqchart/umychart.wechat.3.0.js
wechathqchart/umychart.wechat.3.0.js
+368
-328
未找到文件。
webhqchart/umychart.complier.js
浏览文件 @
208f5e55
...
...
@@ -6925,7 +6925,8 @@ function ScriptIndex(name,script,args,option)
//数据类型
let
hqDataType
=
0
;
//默认K线
if
(
hqChart
.
ClassName
===
'
MinuteChartContainer
'
)
hqDataType
=
2
;
//分钟数据
if
(
hqChart
.
ClassName
===
'
MinuteChartContainer
'
)
hqDataType
=
2
;
//分钟数据
else
if
(
hqChart
.
ClassName
===
'
HistoryMinuteChartContainer
'
)
hqDataType
=
3
;
//历史分钟
let
option
=
{
HQDataType
:
hqDataType
,
...
...
@@ -6939,6 +6940,8 @@ function ScriptIndex(name,script,args,option)
Arguments
:
this
.
Arguments
};
if
(
hqDataType
===
3
)
option
.
TrateDate
=
hqChart
.
TradeDate
;
let
code
=
this
.
Script
;
let
run
=
JSComplier
.
Execute
(
code
,
option
,
hqChart
.
ScriptErrorCallback
);
}
...
...
webhqchart/umychart.js
浏览文件 @
208f5e55
...
...
@@ -298,6 +298,8 @@ function JSChart(divElement)
chart
.
WindowIndex
[
2
+
parseInt
(
i
)]
=
new
ScriptIndex
(
indexInfo
.
Name
,
indexInfo
.
Script
,
indexInfo
.
Args
);
//脚本执行
}
}
if
(
!
isNaN
(
item
.
TitleHeight
))
chart
.
Frame
.
SubFrame
[
2
+
parseInt
(
i
)].
Frame
.
ChartBorder
.
TitleHeight
=
item
.
TitleHeight
;
}
return
chart
;
...
...
@@ -313,19 +315,49 @@ function JSChart(divElement)
chart
.
Create
(
windowsCount
);
//创建子窗口
if
(
option
.
IsShowCorssCursorInfo
==
false
)
//取消显示十字光标刻度信息
{
chart
.
ChartCorssCursor
.
IsShowText
=
option
.
IsShowCorssCursorInfo
;
}
if
(
option
.
Border
)
{
if
(
!
isNaN
(
option
.
Border
.
Left
))
chart
.
Frame
.
ChartBorder
.
Left
=
option
.
Border
.
Left
;
if
(
!
isNaN
(
option
.
Border
.
Right
))
chart
.
Frame
.
ChartBorder
.
Right
=
option
.
Border
.
Right
;
if
(
!
isNaN
(
option
.
Border
.
Top
))
chart
.
Frame
.
ChartBorder
.
Top
=
option
.
Border
.
Top
;
if
(
!
isNaN
(
option
.
Border
.
Bottom
))
chart
.
Frame
.
ChartBorder
.
Bottom
=
option
.
Border
.
Bottom
;
}
let
scriptData
=
new
JSIndexScript
();
for
(
var
i
in
option
.
Windows
)
{
var
item
=
option
.
Windows
[
i
];
var
indexItem
=
JSIndexMap
.
Get
(
item
.
Index
);
if
(
!
indexItem
)
return
null
;
if
(
item
.
Script
)
{
chart
.
WindowIndex
[
2
+
parseInt
(
i
)]
=
new
ScriptIndex
(
item
.
Name
,
item
.
Script
,
item
.
Args
);
//脚本执行
}
else
{
var
indexItem
=
JSIndexMap
.
Get
(
item
.
Index
);
if
(
indexItem
)
{
chart
.
WindowIndex
[
2
+
parseInt
(
i
)]
=
indexItem
.
Create
();
//创建子窗口的指标
chart
.
CreateWindowIndex
(
2
+
parseInt
(
i
));
}
else
{
let
indexInfo
=
scriptData
.
Get
(
item
.
Index
);
if
(
!
indexInfo
)
continue
;
chart
.
WindowIndex
[
2
+
parseInt
(
i
)]
=
indexItem
.
Create
();
//创建子窗口3的指标
chart
.
CreateWindowIndex
(
2
+
parseInt
(
i
));
}
chart
.
WindowIndex
[
2
+
parseInt
(
i
)]
=
new
ScriptIndex
(
indexInfo
.
Name
,
indexInfo
.
Script
,
indexInfo
.
Args
);
//脚本执行
}
}
if
(
!
option
.
HistoryMinute
.
TradeDate
)
return
null
;
if
(
!
isNaN
(
item
.
TitleHeight
))
chart
.
Frame
.
SubFrame
[
2
+
parseInt
(
i
)].
Frame
.
ChartBorder
.
TitleHeight
=
item
.
TitleHeight
;
}
chart
.
TradeDate
=
option
.
HistoryMinute
.
TradeDate
;
chart
.
TradeDate
=
20181009
;
if
(
option
.
HistoryMinute
.
TradeDate
)
chart
.
TradeDate
=
option
.
HistoryMinute
.
TradeDate
;
if
(
option
.
HistoryMinute
.
IsShowName
!=
null
)
chart
.
TitlePaint
[
0
].
IsShowName
=
option
.
HistoryMinute
.
IsShowName
;
//动态标题是否显示股票名称
if
(
option
.
HistoryMinute
.
IsShowDate
!=
null
)
chart
.
TitlePaint
[
0
].
IsShowDate
=
option
.
HistoryMinute
.
IsShowDate
;
//动态标题是否显示日期
...
...
@@ -523,6 +555,16 @@ function JSChart(divElement)
this
.
JSChartContainer
.
LockIndex
(
lockData
);
}
}
//历史分钟数据 更改日期
this
.
ChangeTradeDate
=
function
(
tradeDate
)
{
if
(
this
.
JSChartContainer
&&
typeof
(
this
.
JSChartContainer
.
ChangeTradeDate
)
==
'
function
'
)
{
console
.
log
(
'
[JSChart:ChangeTradeDate] date
'
,
tradeDate
);
this
.
JSChartContainer
.
ChangeTradeDate
(
tradeDate
);
}
}
}
//初始化
...
...
@@ -12361,7 +12403,7 @@ function HistoryMinuteChartContainer(uielement)
delete
this
.
newMethod
;
this
.
HistoryMinuteApiUrl
=
"
https://opensourcecache.zealink.com/cache/minuteday/day/
"
;
this
.
ClassName
=
'
HistoryMinuteChartContainer
'
;
//创建主图K线画法
this
.
CreateMainKLine
=
function
()
...
...
@@ -12411,6 +12453,15 @@ function HistoryMinuteChartContainer(uielement)
}
//设置交易日期
this
.
ChangeTradeDate
=
function
(
trdateDate
)
{
if
(
!
trdateDate
)
return
;
this
.
TradeDate
=
trdateDate
;
this
.
RequestData
();
//更新数据
}
this
.
RequestData
=
function
()
{
var
date
=
new
Date
();
...
...
@@ -12510,7 +12561,7 @@ HistoryMinuteChartContainer.JsonDataToMinuteData=function(data)
item
.
Open
=
aryMinuteData
[
i
-
1
].
Close
;
item
.
High
=
item
.
Close
;
item
.
Low
=
item
.
Close
;
item
.
Vol
=
data
.
minute
.
vol
[
i
]
/
100
;
//原始单位股
item
.
Vol
=
data
.
minute
.
vol
[
i
];
//原始单位股
item
.
Amount
=
data
.
minute
.
amount
[
i
];
item
.
DateTime
=
data
.
date
.
toString
()
+
"
"
+
data
.
minute
.
time
[
i
].
toString
();
//item.Increate=jsData.increate;
...
...
@@ -12523,7 +12574,7 @@ HistoryMinuteChartContainer.JsonDataToMinuteData=function(data)
item
.
Open
=
data
.
minute
.
open
[
i
];
item
.
High
=
data
.
minute
.
high
[
i
];
item
.
Low
=
data
.
minute
.
low
[
i
];
item
.
Vol
=
data
.
minute
.
vol
[
i
]
/
100
;
//原始单位股
item
.
Vol
=
data
.
minute
.
vol
[
i
];
//原始单位股
item
.
Amount
=
data
.
minute
.
amount
[
i
];
item
.
DateTime
=
data
.
date
.
toString
()
+
"
"
+
data
.
minute
.
time
[
i
].
toString
();
//item.Increate=jsData.increate;
...
...
@@ -12531,6 +12582,13 @@ HistoryMinuteChartContainer.JsonDataToMinuteData=function(data)
item
.
AvPrice
=
data
.
minute
.
avprice
[
i
];
}
//价格是0的 都用空
if
(
item
.
Open
<=
0
)
item
.
Open
=
null
;
if
(
item
.
Close
<=
0
)
item
.
Close
=
null
;
if
(
item
.
AvPrice
<=
0
)
item
.
AvPrice
=
null
;
if
(
item
.
High
<=
0
)
item
.
High
=
null
;
if
(
item
.
Low
<=
0
)
item
.
Low
=
null
;
aryMinuteData
[
i
]
=
item
;
}
...
...
wechathqchart/umychart.wechat.3.0.js
浏览文件 @
208f5e55
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录