Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluefrankey
hqchart
提交
af1258b7
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,发现更多精彩内容 >>
提交
af1258b7
编写于
7月 12, 2019
作者:
J
jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ver 6248
上级
00f89b55
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
5648 addition
and
904 deletion
+5648
-904
vuehqchart/src/jscommon/umychart.complier.js
vuehqchart/src/jscommon/umychart.complier.js
+590
-1
vuehqchart/src/jscommon/umychart.index.data.js
vuehqchart/src/jscommon/umychart.index.data.js
+1
-1
vuehqchart/src/jscommon/umychart.js
vuehqchart/src/jscommon/umychart.js
+552
-22
vuehqchart/src/jscommon/umychart.resource/font/iconfont.css
vuehqchart/src/jscommon/umychart.resource/font/iconfont.css
+424
-404
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
+1143
-24
webhqchart.demo/demo/phone22.html
webhqchart.demo/demo/phone22.html
+228
-0
webhqchart.demo/jscommon/umychart.complier.js
webhqchart.demo/jscommon/umychart.complier.js
+590
-1
webhqchart.demo/jscommon/umychart.index.data.js
webhqchart.demo/jscommon/umychart.index.data.js
+1
-1
webhqchart.demo/jscommon/umychart.js
webhqchart.demo/jscommon/umychart.js
+552
-22
webhqchart.demo/jscommon/umychart.resource/font/iconfont.css
webhqchart.demo/jscommon/umychart.resource/font/iconfont.css
+424
-404
webhqchart/umychart.complier.js
webhqchart/umychart.complier.js
+590
-1
webhqchart/umychart.index.data.js
webhqchart/umychart.index.data.js
+1
-1
webhqchart/umychart.js
webhqchart/umychart.js
+552
-22
未找到文件。
vuehqchart/src/jscommon/umychart.complier.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
vuehqchart/src/jscommon/umychart.index.data.js
浏览文件 @
af1258b7
...
...
@@ -43,7 +43,7 @@ function JSIndexScript()
[
'
DMI
'
,
this
.
DMI
],[
'
CR
'
,
this
.
CR
],[
'
PSY
'
,
this
.
PSY
],
[
'
CCI
'
,
this
.
CCI
],[
'
DMA
'
,
this
.
DMA
],[
'
TRIX
'
,
this
.
TRIX
],
[
'
VR
'
,
this
.
VR
],[
'
EMV
'
,
this
.
EMV
],[
'
ROC
'
,
this
.
ROC
],
[
'
MTM
'
,
this
.
M
I
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MTM
'
,
this
.
M
T
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MASS
'
,
this
.
MASS
],[
'
WAD
'
,
this
.
WAD
],[
'
CHO
'
,
this
.
CHO
],
[
'
ADTM
'
,
this
.
ADTM
],[
'
HSL
'
,
this
.
HSL
],[
'
BIAS36
'
,
this
.
BIAS36
],
[
'
BIAS_QL
'
,
this
.
BIAS_QL
],[
'
DPO
'
,
this
.
DPO
],[
'
OSC
'
,
this
.
OSC
],
...
...
vuehqchart/src/jscommon/umychart.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
vuehqchart/src/jscommon/umychart.resource/font/iconfont.css
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
webhqchart.demo/demo/phone22.html
0 → 100644
浏览文件 @
af1258b7
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>
页面行情(K线图)
</title>
<link
rel=
"stylesheet"
href=
"../jscommon/umychart.resource/css/tools.css"
/>
<link
rel=
"stylesheet"
href=
"../jscommon/umychart.resource/font/iconfont.css"
/>
<!-- 使用阿里云图片 -->
<!--<link rel="stylesheet" href="https://at.alicdn.com/t/font_1040563_1d1tgaoqofpi.css" />-->
</head>
<body>
<div
id=
"kline"
style=
"width: 900px;height:400px;position: relative;"
></div>
<script
src=
"content/js/jquery.min.js"
></script>
<script
src=
"content/js/webfont.js"
></script>
<script
src=
"../jscommon/umychart.js"
></script>
<script
src=
"../jscommon/umychart.complier.js"
></script>
<script
src=
"../jscommon/umychart.index.data.js"
></script>
<script
src=
"../jscommon/umychart.style.js"
></script>
<!-- 引入vConsole的JS库 -->
<script
src=
"../vConsole-3.2.0/dist/vconsole.min.js"
></script>
<script>
//预加载下阿里云图片
WebFont
.
load
({
custom
:
{
families
:
[
'
iconfont
'
]
}
});
function
getURLParams
(
name
)
{
var
reg
=
new
RegExp
(
"
(^|&)
"
+
name
+
"
=([^&]*)(&|$)
"
,
"
i
"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
decodeURI
(
r
[
2
]);
return
null
;
}
$
(
window
).
resize
(
resizeCanvas
);
function
resizeCanvas
()
{
var
height
=
$
(
window
).
height
();
var
width
=
$
(
window
).
width
();
var
divKline
=
document
.
getElementById
(
'
kline
'
);
divKline
.
style
.
top
=
0
+
'
px
'
;
divKline
.
style
.
left
=
0
+
'
px
'
;
divKline
.
style
.
width
=
width
+
'
px
'
;
divKline
.
style
.
height
=
height
+
'
px
'
;
divKline
.
JSChart
.
OnSize
();
}
$
(
function
()
{
var
debug
=
getURLParams
(
'
debug
'
);
if
(
debug
==
1
)
{
var
vConsole
=
new
VConsole
();
console
.
log
(
'
create VConsole
'
);
}
var
symbol
=
getURLParams
(
'
symbol
'
);
if
(
symbol
==
null
)
symbol
=
'
000001.sz
'
;
/*
var index=getURLParams('index'); //指标1
if (index==null) index='MA';
var index2=getURLParams('index2'); //指标2
if (index2==null) index2='VOL';
var index3=getURLParams('index3'); //指标3
if (index3==null) index3='MACD';
var aryIndex=new Array();
aryIndex.push({Index:index,Modify:true,Change:true, Overlay:true});
aryIndex.push({Index:index2,Modify:true,Change:true,Overlay:true});
if (index3) aryIndex.push({Index:index3,Modify:true,Change:true,Overlay:true});
*/
//黑色风格设置, 默认是白色风格
//var blackStyle=HQChartStyle.GetStyleConfig(STYLE_TYPE_ID.BLACK_ID);
//JSChart.SetStyle(blackStyle);
//document.getElementById('kline').style.backgroundColor=blackStyle.BGColor;
// 创建股票K线图
console
.
log
(
'
create JSChart
'
);
var
chart
=
JSChart
.
Init
(
document
.
getElementById
(
'
kline
'
));
var
height
=
$
(
window
).
height
();
var
width
=
$
(
window
).
width
();
var
divKline
=
document
.
getElementById
(
'
kline
'
);
divKline
.
style
.
width
=
width
+
'
px
'
;
divKline
.
style
.
height
=
height
+
'
px
'
;
chart
.
OnSize
();
var
option
=
{
Type
:
'
历史K线图
'
,
Windows
:
[
{
Index
:
"
MA
"
,
Modify
:
true
,
Change
:
true
,
Overlay
:
true
},
{
Index
:
"
VOL
"
,
Modify
:
true
,
Change
:
true
,
Overlay
:
true
},
{
Index
:
"
RSI
"
,
Modify
:
true
,
Change
:
true
,
Overlay
:
true
},
],
//窗口指标
OverlayIndex
:
[
{
Index
:
'
RSI
'
,
Windows
:
0
},
{
Index
:
'
MACD
'
,
Windows
:
0
},
{
Index
:
'
MA
'
,
Windows
:
1
}
],
//叠加指标
Symbol
:
symbol
,
IsAutoUpdate
:
false
,
//是自动更新数据
//TradeIndex: {Index:'交易系统-BIAS'}, //交易系统
IsShowRightMenu
:
true
,
//右键菜单
IsShowCorssCursorInfo
:
true
,
//是否显示十字光标的刻度信息
KLine
:
{
DragMode
:
1
,
//拖拽模式 0 禁止拖拽 1 数据拖拽 2 区间选择
Right
:
1
,
//复权 0 不复权 1 前复权 2 后复权
Period
:
0
,
//周期 0 日线 1 周线 2 月线 3 年线
MaxReqeustDataCount
:
1000
,
//数据个数
PageSize
:
150
,
//一屏显示多少数据
IndexTreeApiUrl
:
"
https://opensourcecache.zealink.com/cache/hqh5/index/commonindextree.json
"
,
//指标树下载地址
//Info:["互动易","大宗交易",'龙虎榜',"调研","业绩预告","公告"], //信息地雷
//Info:["公告","互动易","调研"], //信息地雷
KLineDoubleClick
:
true
,
//双击分钟走势图
IsShowTooltip
:
true
,
//是否显示K线提示信息
//FirstShowDate:20180401, //首屏显示的起始日期
},
KLineTitle
:
//标题设置
{
IsShowName
:
true
,
//不显示股票名称
IsShowSettingInfo
:
true
//不显示周期/复权
},
Border
:
//边框
{
Left
:
10
,
//左边间距
Right
:
250
,
//右边间距
Bottom
:
25
,
Top
:
25
},
ExtendChart
:
//扩展图形
[
//{Name:'画图工具',Top:25,IsAutoIndent:1 }
],
Frame
:
//子框架设置 (Height 窗口高度比例值)
[
{
SplitCount
:
5
,
StringFormat
:
0
,
IsShowLeftText
:
false
},
{
SplitCount
:
2
,
StringFormat
:
0
,
IsShowLeftText
:
false
},
{
SplitCount
:
2
,
StringFormat
:
0
,
IsShowLeftText
:
false
}
]
}
var
windowHeight
=
$
(
window
).
height
();
var
windowWidth
=
$
(
window
).
width
();
if
(
windowWidth
<=
420
)
//手机小屏左右不显示坐标
{
option
.
Border
.
Left
=
1
;
option
.
Border
.
Right
=
1
;
option
.
KLine
.
IsShowTooltip
=
false
;
//关闭pc端tooltip
option
.
KLine
.
Info
=
null
;
option
.
KLine
.
PageSize
=
50
;
option
.
ExtendChart
=
[{
Name
:
'
KLineTooltip
'
}];
//开启手机端tooltip
option
.
ExtendChart
=
null
;
option
.
IsCorssOnlyDrawKLine
=
true
;
option
.
CorssCursorTouchEnd
=
true
;
for
(
var
i
in
option
.
Windows
)
{
option
.
Windows
[
i
].
Modify
=
false
;
option
.
Windows
[
i
].
Change
=
false
;
}
}
chart
.
SetOption
(
option
);
//jsChart.LockIndex('飞龙四式',unlockIndex);
//注册监听事件
chart
.
AddEventCallback
({
event
:
JSCHART_EVENT_ID
.
RECV_OVERLAY_INDEX_DATA
,
callback
:
testcallback
})
resizeCanvas
();
//setTimeout(() => { chart.SetFirstShowDate({Date:20170501,PageSize:600});}, 20000);
/* //保存图片数据
setTimeout(() => {
var imageData=chart.SaveToImage();
var image = document.createElement('img');
image.src=imageData;
document.body.appendChild(image);
var download=document.createElement('a');
var imageDownloadData = imageData.replace("image/png", "image/octet-stream");
download.href=imageDownloadData
download.innerText='下载'
document.body.appendChild(download);
}, 20000);
*/
})
function
unlockIndex
(
indexName
)
{
console
.
log
(
indexName
);
}
function
testcallback
(
event
,
data
,
obj
)
{
console
.
log
(
'
[testcallback]
'
,
data
);
}
</script>
</body>
</html>
\ No newline at end of file
webhqchart.demo/jscommon/umychart.complier.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
webhqchart.demo/jscommon/umychart.index.data.js
浏览文件 @
af1258b7
...
...
@@ -43,7 +43,7 @@ function JSIndexScript()
[
'
DMI
'
,
this
.
DMI
],[
'
CR
'
,
this
.
CR
],[
'
PSY
'
,
this
.
PSY
],
[
'
CCI
'
,
this
.
CCI
],[
'
DMA
'
,
this
.
DMA
],[
'
TRIX
'
,
this
.
TRIX
],
[
'
VR
'
,
this
.
VR
],[
'
EMV
'
,
this
.
EMV
],[
'
ROC
'
,
this
.
ROC
],
[
'
MTM
'
,
this
.
M
I
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MTM
'
,
this
.
M
T
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MASS
'
,
this
.
MASS
],[
'
WAD
'
,
this
.
WAD
],[
'
CHO
'
,
this
.
CHO
],
[
'
ADTM
'
,
this
.
ADTM
],[
'
HSL
'
,
this
.
HSL
],[
'
BIAS36
'
,
this
.
BIAS36
],
[
'
BIAS_QL
'
,
this
.
BIAS_QL
],[
'
DPO
'
,
this
.
DPO
],[
'
OSC
'
,
this
.
OSC
],
...
...
webhqchart.demo/jscommon/umychart.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
webhqchart.demo/jscommon/umychart.resource/font/iconfont.css
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
webhqchart/umychart.complier.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
webhqchart/umychart.index.data.js
浏览文件 @
af1258b7
...
...
@@ -43,7 +43,7 @@ function JSIndexScript()
[
'
DMI
'
,
this
.
DMI
],[
'
CR
'
,
this
.
CR
],[
'
PSY
'
,
this
.
PSY
],
[
'
CCI
'
,
this
.
CCI
],[
'
DMA
'
,
this
.
DMA
],[
'
TRIX
'
,
this
.
TRIX
],
[
'
VR
'
,
this
.
VR
],[
'
EMV
'
,
this
.
EMV
],[
'
ROC
'
,
this
.
ROC
],
[
'
MTM
'
,
this
.
M
I
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MTM
'
,
this
.
M
T
M
],[
'
FSL
'
,
this
.
FSL
],[
'
CYR
'
,
this
.
CYR
],
[
'
MASS
'
,
this
.
MASS
],[
'
WAD
'
,
this
.
WAD
],[
'
CHO
'
,
this
.
CHO
],
[
'
ADTM
'
,
this
.
ADTM
],[
'
HSL
'
,
this
.
HSL
],[
'
BIAS36
'
,
this
.
BIAS36
],
[
'
BIAS_QL
'
,
this
.
BIAS_QL
],[
'
DPO
'
,
this
.
DPO
],[
'
OSC
'
,
this
.
OSC
],
...
...
webhqchart/umychart.js
浏览文件 @
af1258b7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录