hqchart 1.1.13976 → 1.1.13983
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/umychart.vue.js +91 -77
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSelectRect.js +864 -0
- package/src/jscommon/umychart.DialogTooltip.js +13 -12
- package/src/jscommon/umychart.PopKeyboard.js +37 -8
- package/src/jscommon/umychart.TReport.js +3 -2
- package/src/jscommon/umychart.js +199 -456
- package/src/jscommon/umychart.resource/css/tools.css +119 -0
- package/src/jscommon/umychart.style.js +13 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +213 -457
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +1131 -480
package/src/jscommon/umychart.js
CHANGED
|
@@ -886,10 +886,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
886
886
|
if (IFrameSplitOperator.IsNumber(item.DelayTime)) chart.DrawDynamicInfoOption.DelayTime=item.DelayTime;
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
|
|
890
|
-
chart.SelectRectDialog=new MinuteSelectRectDialog(this.DivElement);
|
|
891
|
-
|
|
892
|
-
|
|
893
889
|
if (option.Minute) //分钟走势图属性设置
|
|
894
890
|
{
|
|
895
891
|
if (option.Minute.IsShowTooltip==false) chart.IsShowTooltip=false;
|
|
@@ -1730,6 +1726,11 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1730
1726
|
if (option.TooltipDialog && option.TooltipDialog.Enable)
|
|
1731
1727
|
chart.InitalTooltipDialog(option.TooltipDialog);
|
|
1732
1728
|
|
|
1729
|
+
if (option.SelectRectDialog && option.SelectRectDialog.Enable)
|
|
1730
|
+
{
|
|
1731
|
+
chart.InitalSelectRectDialog(option.SelectRectDialog);
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1733
1734
|
//注册事件
|
|
1734
1735
|
if (option.EventCallback)
|
|
1735
1736
|
{
|
|
@@ -3038,6 +3039,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3038
3039
|
this.DialogModifyDraw; //画图修改
|
|
3039
3040
|
|
|
3040
3041
|
this.DialogTooltip; //tooltip信息
|
|
3042
|
+
this.DialogSelectRect; //区间统计
|
|
3041
3043
|
|
|
3042
3044
|
|
|
3043
3045
|
this.ClearStockCache=function()
|
|
@@ -3080,6 +3082,27 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3080
3082
|
this.DialogModifyDraw.Create();
|
|
3081
3083
|
}
|
|
3082
3084
|
|
|
3085
|
+
this.InitalSelectRectDialog=function(option)
|
|
3086
|
+
{
|
|
3087
|
+
if (this.DialogSelectRect) return;
|
|
3088
|
+
|
|
3089
|
+
this.DialogSelectRect=new JSDialogSelectRect();
|
|
3090
|
+
this.DialogSelectRect.Inital(this, option);
|
|
3091
|
+
this.DialogSelectRect.Create();
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
this.DrawSelectRectDialog=function()
|
|
3095
|
+
{
|
|
3096
|
+
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
this.IsShowSelectRectDialog=function()
|
|
3100
|
+
{
|
|
3101
|
+
if (!this.DialogSelectRect) return false;
|
|
3102
|
+
|
|
3103
|
+
return this.DialogSelectRect.IsShow();
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3083
3106
|
this.ShowDrawToolDialog=function(x,y)
|
|
3084
3107
|
{
|
|
3085
3108
|
if (!this.DialogDrawTool) return;
|
|
@@ -3601,8 +3624,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3601
3624
|
}
|
|
3602
3625
|
}
|
|
3603
3626
|
}
|
|
3604
|
-
|
|
3605
|
-
if (!this.
|
|
3627
|
+
|
|
3628
|
+
if (!this.IsShowSelectRectDialog()) //区间统计框存在,不清空区间背景色
|
|
3629
|
+
{
|
|
3630
|
+
if (!this.RectSelectDrag && this.ClearRectSelect(false)) this.Draw();
|
|
3631
|
+
}
|
|
3606
3632
|
|
|
3607
3633
|
if (this.EnableBorderDrag && this.Frame)
|
|
3608
3634
|
{
|
|
@@ -8079,6 +8105,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8079
8105
|
|
|
8080
8106
|
if (this.PopMinuteChart) this.PopMinuteChart.ReloadResource(option);
|
|
8081
8107
|
if (this.DialogTooltip) this.DialogTooltip.ReloadResource(option);
|
|
8108
|
+
if (this.DialogSelectRect) this.DialogSelectRect.ReloadResource(option);
|
|
8082
8109
|
}
|
|
8083
8110
|
|
|
8084
8111
|
this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
|
|
@@ -8829,6 +8856,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8829
8856
|
event.Callback(event,data,this);
|
|
8830
8857
|
}
|
|
8831
8858
|
|
|
8859
|
+
if (this.IsShowSelectRectDialog()) //区间统计
|
|
8860
|
+
{
|
|
8861
|
+
var selectData=paint.GetSelectRectData();
|
|
8862
|
+
|
|
8863
|
+
var data=
|
|
8864
|
+
{
|
|
8865
|
+
Chart:this, X:obj.X, Y:obj.Y,
|
|
8866
|
+
SelectData:selectData, //区间选择的数据
|
|
8867
|
+
RectSelectPaint:paint //区间选择背景
|
|
8868
|
+
};
|
|
8869
|
+
var e={ data:data }
|
|
8870
|
+
this.DrawSelectRectDialog(e);
|
|
8871
|
+
}
|
|
8872
|
+
|
|
8832
8873
|
return true;
|
|
8833
8874
|
}
|
|
8834
8875
|
|
|
@@ -9654,10 +9695,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9654
9695
|
if (this.ShowSelectData && srcParam) this.ShowSelectData(srcParam);
|
|
9655
9696
|
break;
|
|
9656
9697
|
case JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID:
|
|
9657
|
-
|
|
9658
|
-
dlg.DoModal(srcParam);
|
|
9698
|
+
if (this.DialogSelectRect && srcParam) this.DrawSelectRectDialog(srcParam);
|
|
9659
9699
|
break;
|
|
9660
|
-
|
|
9661
9700
|
case JSCHART_MENU_ID.CMD_SHOW_INDEX_ID: //显示隐藏指标 [0]=windowIndex [1]=0=自动 1=隐藏 2=显示
|
|
9662
9701
|
if (param==null || !IFrameSplitOperator.IsNumber(aryArgs[1])) return false;
|
|
9663
9702
|
var windowIndex=param, showType=aryArgs[1];
|
|
@@ -69178,6 +69217,21 @@ function JSChartResource()
|
|
|
69178
69217
|
DateTimeColor:'rgb(60,60,60)',
|
|
69179
69218
|
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
69180
69219
|
PositionColor:"rgb(255,0,255)" //持仓
|
|
69220
|
+
},
|
|
69221
|
+
|
|
69222
|
+
//区间统计
|
|
69223
|
+
this.DialogSelectRect=
|
|
69224
|
+
{
|
|
69225
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
69226
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
69227
|
+
TitleColor:'rgb(0,0,0)', //对话框标题颜色
|
|
69228
|
+
|
|
69229
|
+
TextColor:"rgb(0,0,0)", //数值名称
|
|
69230
|
+
ValueColor:"rgb(0,0,0)", //数值
|
|
69231
|
+
VolColor:"rgb(255, 185, 15)", //标题成交量
|
|
69232
|
+
AmountColor:"rgb(79, 79, 79)", //成交金额
|
|
69233
|
+
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
69234
|
+
PositionColor:"rgb(255,0,255)" //持仓
|
|
69181
69235
|
}
|
|
69182
69236
|
|
|
69183
69237
|
//弹幕
|
|
@@ -70187,6 +70241,22 @@ function JSChartResource()
|
|
|
70187
70241
|
|
|
70188
70242
|
}
|
|
70189
70243
|
|
|
70244
|
+
if (style.DialogSelectRect)
|
|
70245
|
+
{
|
|
70246
|
+
var item=style.DialogSelectRect;
|
|
70247
|
+
if (item.BGColor) this.DialogSelectRect.BGColor=item.BGColor;
|
|
70248
|
+
if (item.BorderColor) this.DialogSelectRect.BorderColor=item.BorderColor;
|
|
70249
|
+
if (item.TitleColor) this.DialogSelectRect.TitleColor=item.TitleColor;
|
|
70250
|
+
|
|
70251
|
+
if (item.TextColor) this.DialogSelectRect.TextColor=item.TextColor;
|
|
70252
|
+
if (item.ValueColor) this.DialogSelectRect.ValueColor=item.ValueColor;
|
|
70253
|
+
if (item.VolColor) this.DialogSelectRect.VolColor=item.VolColor;
|
|
70254
|
+
if (item.AmountColor) this.DialogSelectRect.AmountColor=item.AmountColor;
|
|
70255
|
+
if (item.TurnoverRateColor) this.DialogSelectRect.TurnoverRateColor=item.TurnoverRateColor;
|
|
70256
|
+
if (item.PositionColor) this.DialogSelectRect.PositionColor=item.PositionColor;
|
|
70257
|
+
|
|
70258
|
+
}
|
|
70259
|
+
|
|
70190
70260
|
if (style.MinuteInfo)
|
|
70191
70261
|
{
|
|
70192
70262
|
var item=style.MinuteInfo;
|
|
@@ -71165,13 +71235,28 @@ function JSChartLocalization()
|
|
|
71165
71235
|
['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
|
|
71166
71236
|
['DialogTooltip-AvPrice', {CN:'均价', EN:'AVPrice:', TC:'均價'}],
|
|
71167
71237
|
['DialogTooltip-FClose', {CN:"结算价", EN:'Settlement', TC:'結算價'}],
|
|
71168
|
-
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'
|
|
71238
|
+
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'振幅'}],
|
|
71169
71239
|
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
71170
71240
|
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
71171
71241
|
['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
|
|
71172
71242
|
['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
|
|
71173
71243
|
['DialogTooltip-Value', {CN:'数值', EN:'Value', TC:'数值'}],
|
|
71174
71244
|
|
|
71245
|
+
|
|
71246
|
+
['DialogSelectRect-StartPrice', {CN:'起始价:', EN:'Start Price:', TC:'起始價'}],
|
|
71247
|
+
['DialogSelectRect-EndPrice', {CN:'最终价:', EN:"End Price:", TC:'最终價'}],
|
|
71248
|
+
['DialogSelectRect-High', {CN:'最高价:', EN:'High:', TC:'最高價'}],
|
|
71249
|
+
['DialogSelectRect-Low', {CN:'最低价:', EN:"Low:", TC:'最低價'}],
|
|
71250
|
+
['DialogSelectRect-Increase', {CN:'区间涨幅:', EN:'Increase', TC:'漲幅'}],
|
|
71251
|
+
['DialogSelectRect-Amplitude', {CN:'区间振幅:', EN:'amplitude', TC:'振幅'}],
|
|
71252
|
+
['DialogSelectRect-Vol', {CN:'成交量:', EN:'Volume', TC:'數量'}],
|
|
71253
|
+
['DialogSelectRect-Amount', {CN:'成交额:', EN:'Amount', TC:'金額'}],
|
|
71254
|
+
['DialogSelectRect-Up', {CN:'阳线:', EN:'Up', TC:'阳线'}],
|
|
71255
|
+
['DialogSelectRect-Down', {CN:'阴线:', EN:'Down', TC:'阴线'}],
|
|
71256
|
+
['DialogSelectRect-Unchanged', {CN:'平线:', EN:'Unchanged', TC:'平线'}],
|
|
71257
|
+
['DialogSelectRect-DataCount', {CN:'数据个数:', EN:'Data Count:', TC:'数据个数'}],
|
|
71258
|
+
|
|
71259
|
+
|
|
71175
71260
|
//走势图PC tooltip
|
|
71176
71261
|
['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
|
|
71177
71262
|
['PCTooltip-Time', {CN:'时间', EN:'Time', TC:"時間"}],
|
|
@@ -73519,8 +73604,20 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73519
73604
|
event.Callback(event,data,this);
|
|
73520
73605
|
isShowMenu=data.IsShowMenu;
|
|
73521
73606
|
}
|
|
73522
|
-
|
|
73523
|
-
if (
|
|
73607
|
+
|
|
73608
|
+
if (this.IsShowSelectRectDialog()) //区间统计
|
|
73609
|
+
{
|
|
73610
|
+
var data=
|
|
73611
|
+
{
|
|
73612
|
+
Chart:this,X:x,Y:y,
|
|
73613
|
+
SelectData:selectData, //区间选择的数据
|
|
73614
|
+
RectSelectPaint:paint //区间选择背景
|
|
73615
|
+
};
|
|
73616
|
+
e.data=data;
|
|
73617
|
+
|
|
73618
|
+
this.DrawSelectRectDialog(e);
|
|
73619
|
+
}
|
|
73620
|
+
else if (isShowMenu)
|
|
73524
73621
|
{
|
|
73525
73622
|
var data=
|
|
73526
73623
|
{
|
|
@@ -79517,6 +79614,42 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
79517
79614
|
|
|
79518
79615
|
return true;
|
|
79519
79616
|
}
|
|
79617
|
+
|
|
79618
|
+
this.DrawSelectRectDialog=function(e)
|
|
79619
|
+
{
|
|
79620
|
+
if (!this.DialogSelectRect) return;
|
|
79621
|
+
|
|
79622
|
+
this.UpdateSelectRectDialog(e);
|
|
79623
|
+
}
|
|
79624
|
+
|
|
79625
|
+
this.UpdateSelectRectDialog=function(e)
|
|
79626
|
+
{
|
|
79627
|
+
if (!this.DialogSelectRect) return false;
|
|
79628
|
+
|
|
79629
|
+
var data=e.data; //区间统计数据
|
|
79630
|
+
var x,y;
|
|
79631
|
+
if (data && IFrameSplitOperator.IsNumber(data.X) && IFrameSplitOperator.IsNumber(data.Y))
|
|
79632
|
+
{
|
|
79633
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
79634
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
79635
|
+
var rtScroll=GetScrollPosition();
|
|
79636
|
+
|
|
79637
|
+
x=data.X
|
|
79638
|
+
y=data.Y;
|
|
79639
|
+
x+=(rtClient.left+rtScroll.Left);
|
|
79640
|
+
y+=(rtClient.top+rtScroll.Top);
|
|
79641
|
+
}
|
|
79642
|
+
|
|
79643
|
+
var sendData=
|
|
79644
|
+
{
|
|
79645
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
79646
|
+
SelectData:data.SelectData,
|
|
79647
|
+
X:x, Y:y,
|
|
79648
|
+
e:e
|
|
79649
|
+
}
|
|
79650
|
+
|
|
79651
|
+
this.DialogSelectRect.Update(sendData);
|
|
79652
|
+
}
|
|
79520
79653
|
}
|
|
79521
79654
|
|
|
79522
79655
|
//API 返回数据 转化为array[]
|
|
@@ -79944,7 +80077,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
79944
80077
|
|
|
79945
80078
|
this.ColorLineData; //主图价格线颜色自定义配置
|
|
79946
80079
|
this.EnableSelectRect=false; //是否可以区间选择
|
|
79947
|
-
this.SelectRectDialog=null; //区间选择对话框
|
|
79948
80080
|
|
|
79949
80081
|
this.CorssCursorIndex={ DayIndex:-1, DataIndex:-1, Point:{X:-1, Y:-1} ,Type:-1 };
|
|
79950
80082
|
this.EnableNewIndex=false //是否使用新的索引版本
|
|
@@ -80347,7 +80479,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80347
80479
|
isShowDialog=false; //外部调用了区间选择事件,不弹框
|
|
80348
80480
|
}
|
|
80349
80481
|
|
|
80350
|
-
if (isShowDialog && this.
|
|
80482
|
+
if (isShowDialog && this.DialogSelectRect)
|
|
80351
80483
|
{
|
|
80352
80484
|
e.data=
|
|
80353
80485
|
{
|
|
@@ -80358,7 +80490,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80358
80490
|
RectSelectPaint:paint //区间选择背景
|
|
80359
80491
|
};
|
|
80360
80492
|
|
|
80361
|
-
this.
|
|
80493
|
+
this.HideSelectRect();
|
|
80494
|
+
this.UpdateSelectRect(selectData.Start,selectData.End);
|
|
80495
|
+
this.DrawSelectRectDialog(e);
|
|
80362
80496
|
}
|
|
80363
80497
|
else
|
|
80364
80498
|
{
|
|
@@ -80402,9 +80536,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80402
80536
|
isShowDialog=data.IsShowDialog;
|
|
80403
80537
|
}
|
|
80404
80538
|
|
|
80405
|
-
if (isShowDialog
|
|
80539
|
+
if (isShowDialog)
|
|
80406
80540
|
{
|
|
80407
|
-
|
|
80541
|
+
var data =
|
|
80408
80542
|
{
|
|
80409
80543
|
Chart:this,
|
|
80410
80544
|
X:x,
|
|
@@ -80412,10 +80546,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80412
80546
|
SelectData:selectData, //区间选择的数据
|
|
80413
80547
|
RectSelectPaint:paint //区间选择背景
|
|
80414
80548
|
};
|
|
80549
|
+
e.data=data;
|
|
80415
80550
|
|
|
80416
|
-
this.
|
|
80551
|
+
this.UpdateSelectRectDialog(e);
|
|
80417
80552
|
}
|
|
80418
|
-
|
|
80419
80553
|
}
|
|
80420
80554
|
|
|
80421
80555
|
this.UpdateSelectRect=function(start,end)
|
|
@@ -80472,6 +80606,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80472
80606
|
event.Callback(event,data,this);
|
|
80473
80607
|
}
|
|
80474
80608
|
|
|
80609
|
+
if (this.IsShowSelectRectDialog()) //区间统计
|
|
80610
|
+
{
|
|
80611
|
+
var selectData=paint.GetSelectRectData();
|
|
80612
|
+
var data={ X:obj.X, Y:obj.Y, SelectData:selectData, RectSelectPaint:paint };
|
|
80613
|
+
var e={ data:data };
|
|
80614
|
+
this.DrawSelectRectDialog(e);
|
|
80615
|
+
}
|
|
80616
|
+
|
|
80475
80617
|
return true;
|
|
80476
80618
|
}
|
|
80477
80619
|
|
|
@@ -81420,7 +81562,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81420
81562
|
event.Callback(event,data,this);
|
|
81421
81563
|
}
|
|
81422
81564
|
|
|
81423
|
-
if (this.
|
|
81565
|
+
if (this.DialogSelectRect)
|
|
81424
81566
|
{
|
|
81425
81567
|
e.data=
|
|
81426
81568
|
{
|
|
@@ -81430,7 +81572,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81430
81572
|
SelectData:selectData, //区间选择的数据
|
|
81431
81573
|
RectSelectPaint:paint //区间选择背景
|
|
81432
81574
|
};
|
|
81433
|
-
this.
|
|
81575
|
+
this.DrawSelectRectDialog(e);
|
|
81434
81576
|
}
|
|
81435
81577
|
}
|
|
81436
81578
|
|
|
@@ -85370,6 +85512,42 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85370
85512
|
|
|
85371
85513
|
return true;
|
|
85372
85514
|
}
|
|
85515
|
+
|
|
85516
|
+
this.DrawSelectRectDialog=function(e)
|
|
85517
|
+
{
|
|
85518
|
+
if (!this.DialogSelectRect) return;
|
|
85519
|
+
|
|
85520
|
+
this.UpdateSelectRectDialog(e);
|
|
85521
|
+
}
|
|
85522
|
+
|
|
85523
|
+
this.UpdateSelectRectDialog=function(e)
|
|
85524
|
+
{
|
|
85525
|
+
if (!this.DialogSelectRect) return false;
|
|
85526
|
+
|
|
85527
|
+
var data=e.data; //区间统计数据
|
|
85528
|
+
var x,y;
|
|
85529
|
+
if (data && IFrameSplitOperator.IsNumber(data.X) && IFrameSplitOperator.IsNumber(data.Y))
|
|
85530
|
+
{
|
|
85531
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
85532
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
85533
|
+
var rtScroll=GetScrollPosition();
|
|
85534
|
+
|
|
85535
|
+
x=data.X
|
|
85536
|
+
y=data.Y;
|
|
85537
|
+
x+=(rtClient.left+rtScroll.Left);
|
|
85538
|
+
y+=(rtClient.top+rtScroll.Top);
|
|
85539
|
+
}
|
|
85540
|
+
|
|
85541
|
+
var sendData=
|
|
85542
|
+
{
|
|
85543
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
85544
|
+
SelectData:data.SelectData,
|
|
85545
|
+
X:x, Y:y,
|
|
85546
|
+
e:e
|
|
85547
|
+
}
|
|
85548
|
+
|
|
85549
|
+
this.DialogSelectRect.Update(sendData);
|
|
85550
|
+
}
|
|
85373
85551
|
}
|
|
85374
85552
|
|
|
85375
85553
|
//盘前数据
|
|
@@ -90535,441 +90713,6 @@ function ChangeIndexDialog(divElement)
|
|
|
90535
90713
|
}
|
|
90536
90714
|
}
|
|
90537
90715
|
|
|
90538
|
-
function MinuteSelectRectDialog(divElement)
|
|
90539
|
-
{
|
|
90540
|
-
this.newMethod=IDivDialog; //派生
|
|
90541
|
-
this.newMethod(divElement);
|
|
90542
|
-
delete this.newMethod;
|
|
90543
|
-
|
|
90544
|
-
this.SelectData;
|
|
90545
|
-
this.Dialog;
|
|
90546
|
-
this.HQChart;
|
|
90547
|
-
this.RectSelectPaint;
|
|
90548
|
-
|
|
90549
|
-
//隐藏窗口
|
|
90550
|
-
this.Close=function()
|
|
90551
|
-
{
|
|
90552
|
-
if (this.Dialog)
|
|
90553
|
-
{
|
|
90554
|
-
this.DivElement.removeChild(this.Dialog);
|
|
90555
|
-
this.Dialog=null;
|
|
90556
|
-
this.ID=null;
|
|
90557
|
-
}
|
|
90558
|
-
|
|
90559
|
-
if (this.RectSelectPaint) this.RectSelectPaint.PreventClose=false;
|
|
90560
|
-
}
|
|
90561
|
-
|
|
90562
|
-
//创建
|
|
90563
|
-
this.Create=function()
|
|
90564
|
-
{
|
|
90565
|
-
this.ID=Guid();
|
|
90566
|
-
var div=document.createElement('div');
|
|
90567
|
-
div.className='jchart-select-statistics-box';
|
|
90568
|
-
div.id=this.ID;
|
|
90569
|
-
div.innerHTML=
|
|
90570
|
-
"<div class='parameter jchart-select-section'>\
|
|
90571
|
-
<div class='parameter-header'>\
|
|
90572
|
-
<span>分时图区间统计</span>\
|
|
90573
|
-
<strong id='close' class='icon iconfont icon-close'></strong>\
|
|
90574
|
-
</div>\
|
|
90575
|
-
<div class='parameter-content'>统计数据</div>\
|
|
90576
|
-
<div class='parameter-footer'>\
|
|
90577
|
-
<button id='close' class='submit' >确定</button>\
|
|
90578
|
-
</div>\
|
|
90579
|
-
</div>";
|
|
90580
|
-
|
|
90581
|
-
this.DivElement.appendChild(div);
|
|
90582
|
-
this.Dialog=div;
|
|
90583
|
-
|
|
90584
|
-
//关闭按钮
|
|
90585
|
-
$("#"+this.ID+" #close").click(
|
|
90586
|
-
{
|
|
90587
|
-
divBox:this,
|
|
90588
|
-
},
|
|
90589
|
-
function(event)
|
|
90590
|
-
{
|
|
90591
|
-
event.data.divBox.Close();
|
|
90592
|
-
});
|
|
90593
|
-
}
|
|
90594
|
-
|
|
90595
|
-
this.BindData=function()
|
|
90596
|
-
{
|
|
90597
|
-
var hqData=this.SelectData.Data;
|
|
90598
|
-
var start=this.SelectData.Start;
|
|
90599
|
-
var end=this.SelectData.End;
|
|
90600
|
-
this.HQChart.UpdateSelectRect(start,end);
|
|
90601
|
-
if (this.RectSelectPaint) this.RectSelectPaint.PreventClose=true;
|
|
90602
|
-
|
|
90603
|
-
var showData=
|
|
90604
|
-
{
|
|
90605
|
-
Open:0,Close:0,High:0,Low:0, //起始价格, 结束价格, 最高, 最低
|
|
90606
|
-
Vol:0, Amount:0,
|
|
90607
|
-
Date:
|
|
90608
|
-
{
|
|
90609
|
-
Start:{Time:null, Date:null },
|
|
90610
|
-
End:{ Time:null, Date:null }
|
|
90611
|
-
},
|
|
90612
|
-
Count:0,
|
|
90613
|
-
}
|
|
90614
|
-
|
|
90615
|
-
for(var i=start; i<=end && i<hqData.Data.length; ++i)
|
|
90616
|
-
{
|
|
90617
|
-
var item=hqData.Data[i];
|
|
90618
|
-
if (i==start)
|
|
90619
|
-
{
|
|
90620
|
-
showData.Date.Start.Date=item.Date;
|
|
90621
|
-
showData.Date.Start.Time=item.Time;
|
|
90622
|
-
showData.Open=item.Close;
|
|
90623
|
-
showData.High=item.High;
|
|
90624
|
-
showData.Low=item.Low;
|
|
90625
|
-
}
|
|
90626
|
-
|
|
90627
|
-
showData.Date.End.Date=item.Date;
|
|
90628
|
-
showData.Date.End.Time=item.Time;
|
|
90629
|
-
showData.Close=item.Close;
|
|
90630
|
-
showData.Vol+=item.Vol;
|
|
90631
|
-
showData.Amount+=item.Amount;
|
|
90632
|
-
++showData.Count;
|
|
90633
|
-
if (showData.High<item.High) showData.High=item.High;
|
|
90634
|
-
if(showData.Low>item.Low) showData.Low=item.Low;
|
|
90635
|
-
}
|
|
90636
|
-
|
|
90637
|
-
if (showData.Count<=0) return false;
|
|
90638
|
-
|
|
90639
|
-
if (showData.Vol>0) showData.AvPrice=showData.Amount/showData.Vol; //均价
|
|
90640
|
-
if (showData.Open>0)
|
|
90641
|
-
{
|
|
90642
|
-
showData.Increase = (showData.Close - showData.Open) / showData.Open *100; //区间涨幅
|
|
90643
|
-
showData.Amplitude = (showData.High - showData.Low) / showData.Open * 100; //区间振幅
|
|
90644
|
-
}
|
|
90645
|
-
|
|
90646
|
-
// JSConsole.Chart.Log('[KLineSelectRectDialog::BindData]', showData);
|
|
90647
|
-
var defaultfloatPrecision=GetfloatPrecision(this.SelectData.Symbol);
|
|
90648
|
-
var startDate=IFrameSplitOperator.FormatDateString(showData.Date.Start.Date);
|
|
90649
|
-
var endDate=IFrameSplitOperator.FormatDateString(showData.Date.End.Date);
|
|
90650
|
-
startDate+=' '+IFrameSplitOperator.FormatTimeString(showData.Date.Start.Time,"HH:MM");
|
|
90651
|
-
endDate+=" "+IFrameSplitOperator.FormatTimeString(showData.Date.End.Time,"HH:MM");
|
|
90652
|
-
|
|
90653
|
-
var startLeftClass="",startRightClass="",endLeftClass="",endRightClass="";
|
|
90654
|
-
if(start<=0) startLeftClass = "BtnBackground";
|
|
90655
|
-
if(start >= end) {
|
|
90656
|
-
startRightClass = "BtnBackground";
|
|
90657
|
-
endLeftClass = "BtnBackground";
|
|
90658
|
-
}
|
|
90659
|
-
if(end >= hqData.Data.length - 1) endRightClass = "BtnBackground";
|
|
90660
|
-
|
|
90661
|
-
var div=document.createElement('div');
|
|
90662
|
-
div.className='jchart-select-table-right';
|
|
90663
|
-
div.innerHTML=
|
|
90664
|
-
'<div class="jchart-select-date">\n' +
|
|
90665
|
-
' <span>开始: '+ startDate +'<i class="start-date-left '+ startLeftClass +'"><</i><i class="start-date-right '+ startRightClass +'">></i></span>\n' +
|
|
90666
|
-
' <span>结束: '+ endDate +'<i class="end-date-left '+ endLeftClass +'"><</i><i class="end-date-right '+ endRightClass +'">></i></span>\n' +
|
|
90667
|
-
' <span>总个数: '+ showData.Count +'</span>\n' +
|
|
90668
|
-
' </div>\n' +
|
|
90669
|
-
' <table>\n' +
|
|
90670
|
-
' <tr><td><strong>起始价: </strong><span>'+ showData.Open.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90671
|
-
' <td><strong>终止价: </strong><span>'+ showData.Close.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90672
|
-
' <td><strong>均价: </strong><span>'+ (IFrameSplitOperator.IsNumber(showData.AvPrice) ? showData.AvPrice.toFixed(defaultfloatPrecision):"--.--") +'</span></td></tr>\n' +
|
|
90673
|
-
' <tr><td><strong>最低价: </strong><span>'+ showData.Low.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90674
|
-
' <td><strong>最高价: </strong><span>'+ showData.High.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90675
|
-
' <td><strong>涨跌幅: </strong><span class="'+ IFrameSplitOperator.FormatValueColor(showData.Increase) +'">'+ showData.Increase.toFixed(2) +'%</span></td></tr>\n' +
|
|
90676
|
-
' <tr><td><strong>振幅: </strong><span>'+ showData.Amplitude.toFixed(2) +'%</span></td>' +
|
|
90677
|
-
' <td><strong>成交量: </strong><span>'+ IFrameSplitOperator.FormatValueString(showData.Vol,2) +'股</span></td>' +
|
|
90678
|
-
' <td><strong>金额: </strong><span>'+ IFrameSplitOperator.FormatValueString(showData.Amount,2) +'元</span></td></tr>\n' +
|
|
90679
|
-
' </table>';
|
|
90680
|
-
|
|
90681
|
-
$(".parameter-content").html(div);
|
|
90682
|
-
this.BindEvent();
|
|
90683
|
-
|
|
90684
|
-
return true;
|
|
90685
|
-
}
|
|
90686
|
-
|
|
90687
|
-
this.BindEvent = function ()
|
|
90688
|
-
{
|
|
90689
|
-
var _self = this;
|
|
90690
|
-
if(_self.SelectData.Start > 0){
|
|
90691
|
-
$(".jchart-select-date .start-date-left").click(function () {
|
|
90692
|
-
_self.SelectData.Start--;
|
|
90693
|
-
_self.BindData();
|
|
90694
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90695
|
-
})
|
|
90696
|
-
}
|
|
90697
|
-
if(_self.SelectData.Start < _self.SelectData.End){
|
|
90698
|
-
$(".jchart-select-date .start-date-right").click(function () {
|
|
90699
|
-
_self.SelectData.Start++;
|
|
90700
|
-
_self.BindData();
|
|
90701
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90702
|
-
})
|
|
90703
|
-
$(".jchart-select-date .end-date-left").click(function () {
|
|
90704
|
-
_self.SelectData.End--;
|
|
90705
|
-
_self.BindData();
|
|
90706
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90707
|
-
})
|
|
90708
|
-
}
|
|
90709
|
-
if(_self.SelectData.End < _self.SelectData.Data.Data.length - 1){
|
|
90710
|
-
$(".jchart-select-date .end-date-right").click(function () {
|
|
90711
|
-
_self.SelectData.End++;
|
|
90712
|
-
_self.BindData();
|
|
90713
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90714
|
-
})
|
|
90715
|
-
}
|
|
90716
|
-
}
|
|
90717
|
-
|
|
90718
|
-
|
|
90719
|
-
//显示
|
|
90720
|
-
this.DoModal=function(event)
|
|
90721
|
-
{
|
|
90722
|
-
var chart=event.data.Chart;
|
|
90723
|
-
if (this.ID==null) this.Create(); //第1次 需要创建div
|
|
90724
|
-
this.SelectData=event.data.SelectData;
|
|
90725
|
-
this.RectSelectPaint=event.data.RectSelectPaint;
|
|
90726
|
-
this.HQChart=chart;
|
|
90727
|
-
this.HQChart.HideSelectRect();
|
|
90728
|
-
if (!this.BindData()) return;
|
|
90729
|
-
|
|
90730
|
-
this.Show(); //通过CSS居中显示
|
|
90731
|
-
}
|
|
90732
|
-
|
|
90733
|
-
|
|
90734
|
-
}
|
|
90735
|
-
|
|
90736
|
-
//区间统计
|
|
90737
|
-
function KLineSelectRectDialog(divElement)
|
|
90738
|
-
{
|
|
90739
|
-
this.newMethod=IDivDialog; //派生
|
|
90740
|
-
this.newMethod(divElement);
|
|
90741
|
-
delete this.newMethod;
|
|
90742
|
-
|
|
90743
|
-
this.SelectData;
|
|
90744
|
-
this.Dialog;
|
|
90745
|
-
this.HQChart;
|
|
90746
|
-
this.RectSelectPaint;
|
|
90747
|
-
|
|
90748
|
-
//隐藏窗口
|
|
90749
|
-
this.Close=function()
|
|
90750
|
-
{
|
|
90751
|
-
if (this.Dialog)
|
|
90752
|
-
{
|
|
90753
|
-
this.DivElement.removeChild(this.Dialog);
|
|
90754
|
-
this.Dialog=null;
|
|
90755
|
-
}
|
|
90756
|
-
|
|
90757
|
-
if (this.RectSelectPaint) this.RectSelectPaint.PreventClose=false;
|
|
90758
|
-
}
|
|
90759
|
-
|
|
90760
|
-
//创建
|
|
90761
|
-
this.Create=function()
|
|
90762
|
-
{
|
|
90763
|
-
this.ID=Guid();
|
|
90764
|
-
var div=document.createElement('div');
|
|
90765
|
-
div.className='jchart-select-statistics-box';
|
|
90766
|
-
div.id=this.ID;
|
|
90767
|
-
div.innerHTML=
|
|
90768
|
-
"<div class='parameter jchart-select-section'>\
|
|
90769
|
-
<div class='parameter-header'>\
|
|
90770
|
-
<span>区间统计</span>\
|
|
90771
|
-
<strong id='close' class='icon iconfont icon-close'></strong>\
|
|
90772
|
-
</div>\
|
|
90773
|
-
<div class='parameter-content'>统计数据</div>\
|
|
90774
|
-
<div class='parameter-footer'>\
|
|
90775
|
-
<button id='close' class='submit' >确定</button>\
|
|
90776
|
-
<button id='match' class='submit' >形态匹配</button>\
|
|
90777
|
-
</div>\
|
|
90778
|
-
</div>";
|
|
90779
|
-
|
|
90780
|
-
this.DivElement.appendChild(div);
|
|
90781
|
-
this.Dialog=div;
|
|
90782
|
-
|
|
90783
|
-
//关闭按钮
|
|
90784
|
-
$("#"+this.ID+" #close").click(
|
|
90785
|
-
{
|
|
90786
|
-
divBox:this,
|
|
90787
|
-
},
|
|
90788
|
-
function(event)
|
|
90789
|
-
{
|
|
90790
|
-
event.data.divBox.Close();
|
|
90791
|
-
});
|
|
90792
|
-
|
|
90793
|
-
//形态匹配
|
|
90794
|
-
$("#"+this.ID+" #match").click(
|
|
90795
|
-
{
|
|
90796
|
-
divBox:this,
|
|
90797
|
-
},
|
|
90798
|
-
function(event)
|
|
90799
|
-
{
|
|
90800
|
-
event.data.divBox.KLineMatch();
|
|
90801
|
-
});
|
|
90802
|
-
}
|
|
90803
|
-
|
|
90804
|
-
this.BindData=function()
|
|
90805
|
-
{
|
|
90806
|
-
var hqData=this.SelectData.Data;
|
|
90807
|
-
var start=this.SelectData.Start;
|
|
90808
|
-
var end=this.SelectData.End;
|
|
90809
|
-
this.HQChart.UpdateSelectRect(start,end);
|
|
90810
|
-
if (this.RectSelectPaint) this.RectSelectPaint.PreventClose=true;
|
|
90811
|
-
|
|
90812
|
-
var showData=
|
|
90813
|
-
{
|
|
90814
|
-
Open:0,Close:0,High:0,Low:0, YClose:0,
|
|
90815
|
-
Vol:0, Amount:0,
|
|
90816
|
-
Date:
|
|
90817
|
-
{
|
|
90818
|
-
Start:{Time:null, Date:null },
|
|
90819
|
-
End:{ Time:null, Date:null }
|
|
90820
|
-
},
|
|
90821
|
-
Count:0,
|
|
90822
|
-
KLine:{ Up:0,Down:0,Unchanged:0 } //阳线|阴线|平线
|
|
90823
|
-
}
|
|
90824
|
-
|
|
90825
|
-
for(var i=start; i<=end && i<hqData.Data.length; ++i)
|
|
90826
|
-
{
|
|
90827
|
-
var item=hqData.Data[i];
|
|
90828
|
-
if (i==start)
|
|
90829
|
-
{
|
|
90830
|
-
showData.Date.Start.Date=item.Date;
|
|
90831
|
-
showData.Date.Start.Time=item.Time;
|
|
90832
|
-
showData.Open=item.Open;
|
|
90833
|
-
showData.High=item.High;
|
|
90834
|
-
showData.Low=item.Low;
|
|
90835
|
-
showData.YClose=item.YClose;
|
|
90836
|
-
}
|
|
90837
|
-
|
|
90838
|
-
showData.Date.End.Date=item.Date;
|
|
90839
|
-
showData.Date.End.Time=item.Time;
|
|
90840
|
-
showData.Close=item.Close;
|
|
90841
|
-
showData.Vol+=item.Vol;
|
|
90842
|
-
showData.Amount+=item.Amount;
|
|
90843
|
-
++showData.Count;
|
|
90844
|
-
if (showData.High<item.High) showData.High=item.High;
|
|
90845
|
-
if(showData.Low>item.Low) showData.Low=item.Low;
|
|
90846
|
-
if (item.Close>item.Open) ++showData.KLine.Up;
|
|
90847
|
-
else if (item.Close<item.Open) ++showData.KLine.Down;
|
|
90848
|
-
else ++showData.KLine.Unchanged;
|
|
90849
|
-
}
|
|
90850
|
-
|
|
90851
|
-
if (showData.Vol>0) showData.AvPrice=showData.Amount/showData.Vol; //均价
|
|
90852
|
-
if (item.YClose>0)
|
|
90853
|
-
{
|
|
90854
|
-
showData.Increase = (showData.Close - showData.YClose) / showData.YClose *100; //涨幅
|
|
90855
|
-
showData.Amplitude = (showData.High - showData.Low) / showData.YClose * 100; //振幅
|
|
90856
|
-
}
|
|
90857
|
-
|
|
90858
|
-
// JSConsole.Chart.Log('[KLineSelectRectDialog::BindData]', showData);
|
|
90859
|
-
var defaultfloatPrecision=GetfloatPrecision(this.SelectData.Symbol);
|
|
90860
|
-
var startDate=IFrameSplitOperator.FormatDateString(showData.Date.Start.Date);
|
|
90861
|
-
var endDate=IFrameSplitOperator.FormatDateString(showData.Date.End.Date);
|
|
90862
|
-
if (ChartData.IsMinutePeriod(this.HQChart.Period))
|
|
90863
|
-
{
|
|
90864
|
-
startDate+=' '+IFrameSplitOperator.FormatTimeString(showData.Date.Start.Time,"HH:MM");
|
|
90865
|
-
endDate+=" "+IFrameSplitOperator.FormatTimeString(showData.Date.End.Time,"HH:MM");
|
|
90866
|
-
}
|
|
90867
|
-
else if (ChartData.IsSecondPeriod(this.HQChart.Period) || ChartData.IsTickPeriod(this.HQChart.Period))
|
|
90868
|
-
{
|
|
90869
|
-
startDate+=' '+IFrameSplitOperator.FormatTimeString(showData.Date.Start.Time,"HH:MM:SS");
|
|
90870
|
-
endDate+=" "+IFrameSplitOperator.FormatTimeString(showData.Date.End.Time,"HH:MM:SS");
|
|
90871
|
-
}
|
|
90872
|
-
|
|
90873
|
-
var startLeftClass="",startRightClass="",endLeftClass="",endRightClass="";
|
|
90874
|
-
if(start<=0) startLeftClass = "BtnBackground";
|
|
90875
|
-
if(start >= end) {
|
|
90876
|
-
startRightClass = "BtnBackground";
|
|
90877
|
-
endLeftClass = "BtnBackground";
|
|
90878
|
-
}
|
|
90879
|
-
if(end >= hqData.Data.length - 1) endRightClass = "BtnBackground";
|
|
90880
|
-
|
|
90881
|
-
var div=document.createElement('div');
|
|
90882
|
-
div.className='jchart-select-table-right';
|
|
90883
|
-
div.innerHTML=
|
|
90884
|
-
'<div class="jchart-select-date">\n' +
|
|
90885
|
-
' <span>开始: '+ startDate +'<i class="start-date-left '+ startLeftClass +'"><</i><i class="start-date-right '+ startRightClass +'">></i></span>\n' +
|
|
90886
|
-
' <span>结束: '+ endDate +'<i class="end-date-left '+ endLeftClass +'"><</i><i class="end-date-right '+ endRightClass +'">></i></span>\n' +
|
|
90887
|
-
' <span>总个数: '+ showData.Count +'</span>\n' +
|
|
90888
|
-
' </div>\n' +
|
|
90889
|
-
' <table>\n' +
|
|
90890
|
-
' <tr><td><strong>起始价: </strong><span>'+ showData.YClose.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90891
|
-
' <td><strong>最终价: </strong><span>'+ showData.Close.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90892
|
-
' <td><strong>均价: </strong><span>'+ (IFrameSplitOperator.IsNumber(showData.AvPrice) ? showData.AvPrice.toFixed(defaultfloatPrecision):"--.--") +'</span></td></tr>\n' +
|
|
90893
|
-
' <tr><td><strong>最低价: </strong><span>'+ showData.Low.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90894
|
-
' <td><strong>最高价: </strong><span>'+ showData.High.toFixed(defaultfloatPrecision) +'</span></td>' +
|
|
90895
|
-
' <td><strong>涨跌幅: </strong><span class="'+ IFrameSplitOperator.FormatValueColor(showData.Increase) +'">'+ showData.Increase.toFixed(2) +'%</span></td></tr>\n' +
|
|
90896
|
-
' <tr><td><strong>振幅: </strong><span>'+ showData.Amplitude.toFixed(2) +'%</span></td>' +
|
|
90897
|
-
' <td><strong>成交量: </strong><span>'+ IFrameSplitOperator.FormatValueString(showData.Vol,2) +'股</span></td>' +
|
|
90898
|
-
' <td><strong>金额: </strong><span>'+ IFrameSplitOperator.FormatValueString(showData.Amount,2) +'元</span></td></tr>\n' +
|
|
90899
|
-
' <tr><td><strong>阴线: </strong><span>'+ showData.KLine.Up +'</span></td>' +
|
|
90900
|
-
' <td><strong>阳线: </strong><span>'+ showData.KLine.Down +'</span></td>' +
|
|
90901
|
-
' <td><strong>平线: </strong><span>'+ showData.KLine.Unchanged +'</span></td></tr>\n' +
|
|
90902
|
-
' </table>';
|
|
90903
|
-
|
|
90904
|
-
$(".parameter-content").html(div);
|
|
90905
|
-
this.BindEvent();
|
|
90906
|
-
}
|
|
90907
|
-
|
|
90908
|
-
this.BindEvent = function () {
|
|
90909
|
-
var _self = this;
|
|
90910
|
-
if(_self.SelectData.Start > 0){
|
|
90911
|
-
$(".jchart-select-date .start-date-left").click(function () {
|
|
90912
|
-
_self.SelectData.Start--;
|
|
90913
|
-
_self.BindData();
|
|
90914
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90915
|
-
})
|
|
90916
|
-
}
|
|
90917
|
-
if(_self.SelectData.Start < _self.SelectData.End){
|
|
90918
|
-
$(".jchart-select-date .start-date-right").click(function () {
|
|
90919
|
-
_self.SelectData.Start++;
|
|
90920
|
-
_self.BindData();
|
|
90921
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90922
|
-
})
|
|
90923
|
-
$(".jchart-select-date .end-date-left").click(function () {
|
|
90924
|
-
_self.SelectData.End--;
|
|
90925
|
-
_self.BindData();
|
|
90926
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90927
|
-
})
|
|
90928
|
-
}
|
|
90929
|
-
if(_self.SelectData.End < _self.SelectData.Data.Data.length - 1){
|
|
90930
|
-
$(".jchart-select-date .end-date-right").click(function () {
|
|
90931
|
-
_self.SelectData.End++;
|
|
90932
|
-
_self.BindData();
|
|
90933
|
-
_self.HQChart.UpdateSelectRect(_self.SelectData.Start,_self.SelectData.End);
|
|
90934
|
-
})
|
|
90935
|
-
}
|
|
90936
|
-
}
|
|
90937
|
-
|
|
90938
|
-
//显示
|
|
90939
|
-
this.DoModal=function(event)
|
|
90940
|
-
{
|
|
90941
|
-
var chart=event.data.Chart;
|
|
90942
|
-
if (this.ID==null) this.Create(); //第1次 需要创建div
|
|
90943
|
-
this.SelectData=event.data.SelectData;
|
|
90944
|
-
this.RectSelectPaint=event.data.RectSelectPaint;
|
|
90945
|
-
this.HQChart=chart;
|
|
90946
|
-
this.HQChart.HideSelectRect();
|
|
90947
|
-
this.BindData();
|
|
90948
|
-
|
|
90949
|
-
this.Show(); //通过CSS居中显示
|
|
90950
|
-
}
|
|
90951
|
-
|
|
90952
|
-
//形态匹配
|
|
90953
|
-
this.KLineMatch=function(data)
|
|
90954
|
-
{
|
|
90955
|
-
var waitDialog=new WaitDialog(this.DivElement);
|
|
90956
|
-
waitDialog.DoModal(
|
|
90957
|
-
{
|
|
90958
|
-
data:
|
|
90959
|
-
{
|
|
90960
|
-
Title:'计算中......',
|
|
90961
|
-
Chart:this.HQChart
|
|
90962
|
-
}
|
|
90963
|
-
});
|
|
90964
|
-
|
|
90965
|
-
this.Close(); //关闭窗口
|
|
90966
|
-
|
|
90967
|
-
var hqChart=this.HQChart;
|
|
90968
|
-
var param= { Scope: { Plate:["CNA.ci"],Minsimilar:0.90 }, WaitDialog:waitDialog } //沪深A股, 相似度>=90%
|
|
90969
|
-
hqChart.RequestKLineMatch(this.SelectData, param);
|
|
90970
|
-
}
|
|
90971
|
-
}
|
|
90972
|
-
|
|
90973
90716
|
//形态选股
|
|
90974
90717
|
function KLineMatchDialog(divElement)
|
|
90975
90718
|
{
|