hqchart 1.1.13909 → 1.1.13915
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.NetworkFilterTest.vue.js +1 -1
- package/lib/umychart.vue.js +109 -40
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +571 -0
- package/src/jscommon/umychart.NetworkFilterTest.js +1 -1
- package/src/jscommon/umychart.complier.js +19 -3
- package/src/jscommon/umychart.js +267 -9
- package/src/jscommon/umychart.resource/css/tools.css +77 -0
- package/src/jscommon/umychart.style.js +13 -1
- package/src/jscommon/umychart.testdata.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +300 -14
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +871 -15
|
@@ -4420,6 +4420,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4420
4420
|
|
|
4421
4421
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
4422
4422
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
4423
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
4423
4424
|
|
|
4424
4425
|
}
|
|
4425
4426
|
|
|
@@ -4897,6 +4898,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4897
4898
|
|
|
4898
4899
|
if (IFrameSplitOperator.IsNumber(item.HPenType)) chart.ChartCorssCursor.HPenType=item.HPenType;
|
|
4899
4900
|
if (IFrameSplitOperator.IsNumber(item.VPenType)) chart.ChartCorssCursor.VPenType=item.VPenType;
|
|
4901
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
4900
4902
|
}
|
|
4901
4903
|
|
|
4902
4904
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
@@ -5643,6 +5645,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5643
5645
|
if (option.EnableDrawToolDialogV2===true) chart.InitalDrawToolDialog();
|
|
5644
5646
|
if (option.EnableModifyDrawDialogV2===true) chart.InitalModifyDrawDialog();
|
|
5645
5647
|
|
|
5648
|
+
//K线tooltip
|
|
5649
|
+
if (option.EnableTooltipDialog===true) chart.InitalTooltipDialog();
|
|
5650
|
+
|
|
5646
5651
|
//注册事件
|
|
5647
5652
|
if (option.EventCallback)
|
|
5648
5653
|
{
|
|
@@ -6944,6 +6949,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6944
6949
|
this.DialogDrawTool; //画图工具
|
|
6945
6950
|
this.DialogModifyDraw; //画图修改
|
|
6946
6951
|
|
|
6952
|
+
this.DialogTooltip; //tooltip信息
|
|
6953
|
+
|
|
6947
6954
|
|
|
6948
6955
|
this.ClearStockCache=function()
|
|
6949
6956
|
{
|
|
@@ -6967,6 +6974,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6967
6974
|
this.DialogDrawTool.Create();
|
|
6968
6975
|
}
|
|
6969
6976
|
|
|
6977
|
+
this.InitalTooltipDialog=function()
|
|
6978
|
+
{
|
|
6979
|
+
if (this.DialogTooltip) return;
|
|
6980
|
+
|
|
6981
|
+
this.DialogTooltip=new JSDialogTooltip();
|
|
6982
|
+
this.DialogTooltip.Inital(this);
|
|
6983
|
+
this.DialogTooltip.Create();
|
|
6984
|
+
}
|
|
6985
|
+
|
|
6970
6986
|
this.InitalModifyDrawDialog=function()
|
|
6971
6987
|
{
|
|
6972
6988
|
if ( this.DialogModifyDraw) return;
|
|
@@ -7023,6 +7039,22 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7023
7039
|
this.DialogModifyDraw.Close();
|
|
7024
7040
|
}
|
|
7025
7041
|
|
|
7042
|
+
this.IsShowTooltipDialog=function()
|
|
7043
|
+
{
|
|
7044
|
+
if (!this.DialogTooltip) return false;
|
|
7045
|
+
|
|
7046
|
+
return this.DialogTooltip.IsShow();
|
|
7047
|
+
}
|
|
7048
|
+
|
|
7049
|
+
this.CloseTooltipDialog=function()
|
|
7050
|
+
{
|
|
7051
|
+
if (!this.DialogTooltip) return;
|
|
7052
|
+
|
|
7053
|
+
this.DialogTooltip.Close();
|
|
7054
|
+
}
|
|
7055
|
+
|
|
7056
|
+
|
|
7057
|
+
|
|
7026
7058
|
//obj={ Element:, Canvas: }
|
|
7027
7059
|
this.SetCorssCursorElement=function(obj)
|
|
7028
7060
|
{
|
|
@@ -9349,6 +9381,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9349
9381
|
|
|
9350
9382
|
this.DrawDrawPictureXYCoordinate(); //绘制画图工具 X,Y轴刻度信息
|
|
9351
9383
|
|
|
9384
|
+
var bDrawDialogTooltip=false;
|
|
9352
9385
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
9353
9386
|
if (this.LastPoint.X!=null || this.LastPoint.Y!=null)
|
|
9354
9387
|
{
|
|
@@ -9392,6 +9425,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9392
9425
|
{
|
|
9393
9426
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
9394
9427
|
}
|
|
9428
|
+
|
|
9429
|
+
bDrawDialogTooltip=true;
|
|
9395
9430
|
}
|
|
9396
9431
|
|
|
9397
9432
|
ptPosition=this.Frame.PtInFrame(this.LastPoint.X, this.LastPoint.Y);
|
|
@@ -9472,6 +9507,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9472
9507
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
9473
9508
|
if (frame && frame.DrawToolbarTooltip) frame.DrawToolbarTooltip(this.LastMouseStatus.MouseOnToolbar);
|
|
9474
9509
|
}
|
|
9510
|
+
|
|
9511
|
+
|
|
9512
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
9475
9513
|
|
|
9476
9514
|
//发送图形状态给外部
|
|
9477
9515
|
if (this.mapEvent.has(JSCHART_EVENT_ID.CHART_STATUS))
|
|
@@ -9797,7 +9835,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9797
9835
|
}
|
|
9798
9836
|
|
|
9799
9837
|
this.DrawDrawPictureXYCoordinate();
|
|
9800
|
-
|
|
9838
|
+
var bDrawDialogTooltip=false;
|
|
9801
9839
|
if (this.ChartCorssCursor)
|
|
9802
9840
|
{
|
|
9803
9841
|
this.ChartCorssCursor.LastPoint=this.LastPoint;
|
|
@@ -9841,6 +9879,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9841
9879
|
{
|
|
9842
9880
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
9843
9881
|
}
|
|
9882
|
+
|
|
9883
|
+
bDrawDialogTooltip=true;
|
|
9844
9884
|
}
|
|
9845
9885
|
|
|
9846
9886
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
@@ -9935,6 +9975,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9935
9975
|
|
|
9936
9976
|
this.OffscreenToShowCanvas();
|
|
9937
9977
|
|
|
9978
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
9979
|
+
|
|
9938
9980
|
++this.TouchDrawCount;
|
|
9939
9981
|
}
|
|
9940
9982
|
|
|
@@ -10363,6 +10405,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10363
10405
|
}
|
|
10364
10406
|
|
|
10365
10407
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
10408
|
+
|
|
10409
|
+
var draw=false;
|
|
10410
|
+
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
10411
|
+
{
|
|
10412
|
+
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
10413
|
+
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
10414
|
+
draw=sendData.Draw;
|
|
10415
|
+
}
|
|
10416
|
+
|
|
10366
10417
|
switch(keyID)
|
|
10367
10418
|
{
|
|
10368
10419
|
case 37: //left
|
|
@@ -10505,6 +10556,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10505
10556
|
return;
|
|
10506
10557
|
}
|
|
10507
10558
|
|
|
10559
|
+
if (draw) this.DrawDynamicInfo();
|
|
10560
|
+
|
|
10508
10561
|
//不让滚动条滚动
|
|
10509
10562
|
if(e.preventDefault) e.preventDefault();
|
|
10510
10563
|
else e.returnValue = false;
|
|
@@ -10812,6 +10865,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10812
10865
|
this.ShowTooltip(this.LastPoint.X/pixelTatio,this.LastPoint.Y/pixelTatio,toolTip);
|
|
10813
10866
|
}
|
|
10814
10867
|
|
|
10868
|
+
this.DrawTooltipDialog=function()
|
|
10869
|
+
{
|
|
10870
|
+
|
|
10871
|
+
}
|
|
10872
|
+
|
|
10815
10873
|
this.ShowTooltip=function(x,y,toolTip)
|
|
10816
10874
|
{
|
|
10817
10875
|
if (!this.IsShowTooltip) return;
|
|
@@ -11921,6 +11979,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11921
11979
|
else if (option.Draw==true) this.Draw(); //是否立即重绘
|
|
11922
11980
|
|
|
11923
11981
|
if (this.PopMinuteChart) this.PopMinuteChart.ReloadResource(option);
|
|
11982
|
+
if (this.DialogTooltip) this.DialogTooltip.ReloadResource(option);
|
|
11924
11983
|
}
|
|
11925
11984
|
|
|
11926
11985
|
this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
|
|
@@ -13910,6 +13969,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13910
13969
|
item.Status=OVERLAY_STATUS_ID.STATUS_NONE_ID;
|
|
13911
13970
|
}
|
|
13912
13971
|
}
|
|
13972
|
+
|
|
13973
|
+
//十字光标状态变动
|
|
13974
|
+
this.OnChangeCorssCursorStatus=function(data, obj)
|
|
13975
|
+
{
|
|
13976
|
+
if (data.Type==1)
|
|
13977
|
+
{
|
|
13978
|
+
if (!data.IsShowCorss) //十字光标隐藏
|
|
13979
|
+
{
|
|
13980
|
+
this.HideTooltip();
|
|
13981
|
+
this.CloseTooltipDialog();
|
|
13982
|
+
}
|
|
13983
|
+
}
|
|
13984
|
+
}
|
|
13913
13985
|
}
|
|
13914
13986
|
|
|
13915
13987
|
function GetDevicePixelRatio()
|
|
@@ -36891,7 +36963,8 @@ function ChartVolStick()
|
|
|
36891
36963
|
this.ClassName='ChartVolStick';
|
|
36892
36964
|
|
|
36893
36965
|
this.BarWidth; //固定宽度 目前只支持宽度为1
|
|
36894
|
-
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
36966
|
+
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
36967
|
+
this.BarColorType=0; //0=柱子颜色跟K线走 1=正upcolor 负downcolor
|
|
36895
36968
|
this.PtInChart=this.PtInBar;
|
|
36896
36969
|
this.DrawSelectedStatus=this.DrawLinePoint;
|
|
36897
36970
|
|
|
@@ -36938,7 +37011,7 @@ function ChartVolStick()
|
|
|
36938
37011
|
if (right>chartright) break;
|
|
36939
37012
|
|
|
36940
37013
|
var y=this.ChartFrame.GetYFromData(value);
|
|
36941
|
-
var barColor=this.GetBarColor(kItem);
|
|
37014
|
+
var barColor=this.GetBarColor(kItem,value);
|
|
36942
37015
|
var bUp=barColor.IsUp;
|
|
36943
37016
|
|
|
36944
37017
|
|
|
@@ -36986,7 +37059,7 @@ function ChartVolStick()
|
|
|
36986
37059
|
if (x>chartright) break;
|
|
36987
37060
|
|
|
36988
37061
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
36989
|
-
else barColor=this.GetBarColor(kItem);
|
|
37062
|
+
else barColor=this.GetBarColor(kItem, value);
|
|
36990
37063
|
|
|
36991
37064
|
this.Canvas.strokeStyle=barColor.Color;
|
|
36992
37065
|
|
|
@@ -37031,7 +37104,7 @@ function ChartVolStick()
|
|
|
37031
37104
|
if (right>chartBottom) break;
|
|
37032
37105
|
|
|
37033
37106
|
var y=this.ChartFrame.GetYFromData(value);
|
|
37034
|
-
var barColor=this.GetBarColor(kItem);
|
|
37107
|
+
var barColor=this.GetBarColor(kItem, value);
|
|
37035
37108
|
var bUp=barColor.IsUp;
|
|
37036
37109
|
|
|
37037
37110
|
var height=ToFixedRect(y-yBottom); //高度调整为整数
|
|
@@ -37077,7 +37150,7 @@ function ChartVolStick()
|
|
|
37077
37150
|
if (x>chartBottom) break;
|
|
37078
37151
|
|
|
37079
37152
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
37080
|
-
else barColor=this.GetBarColor(kItem);
|
|
37153
|
+
else barColor=this.GetBarColor(kItem,value);
|
|
37081
37154
|
|
|
37082
37155
|
var bUp=barColor.IsUp;
|
|
37083
37156
|
this.Canvas.strokeStyle=barColor.Color;
|
|
@@ -37117,8 +37190,14 @@ function ChartVolStick()
|
|
|
37117
37190
|
return range;
|
|
37118
37191
|
}
|
|
37119
37192
|
|
|
37120
|
-
this.GetBarColor=function(kItem)
|
|
37193
|
+
this.GetBarColor=function(kItem, value)
|
|
37121
37194
|
{
|
|
37195
|
+
if (this.BarColorType===1) //更具正负决定柱子颜色
|
|
37196
|
+
{
|
|
37197
|
+
if (value>=0) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
37198
|
+
else return { Color:this.DownColor, IsUp:false };
|
|
37199
|
+
}
|
|
37200
|
+
|
|
37122
37201
|
if (kItem.Close>=kItem.Open) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
37123
37202
|
else return { Color:this.DownColor, IsUp:false };
|
|
37124
37203
|
}
|
|
@@ -46112,7 +46191,7 @@ function KLineTooltipPaint()
|
|
|
46112
46191
|
}
|
|
46113
46192
|
|
|
46114
46193
|
if (this.HQChart.CurrentChartDrawPicture) return false; //画图工具操作的时候 不显示
|
|
46115
|
-
|
|
46194
|
+
|
|
46116
46195
|
return true;
|
|
46117
46196
|
}
|
|
46118
46197
|
|
|
@@ -46944,6 +47023,8 @@ function MinuteLeftTooltipPaint()
|
|
|
46944
47023
|
var pt=this.HQChart.LastPoint;
|
|
46945
47024
|
if (!pt) return false;
|
|
46946
47025
|
|
|
47026
|
+
if (this.HQChart.ChartCorssCursor && !this.HQChart.ChartCorssCursor.IsShowCorss) return false;
|
|
47027
|
+
|
|
46947
47028
|
return this.HQChart.IsMouseOnClient(pt.X, pt.Y);
|
|
46948
47029
|
}
|
|
46949
47030
|
|
|
@@ -54594,6 +54675,9 @@ function ChartCorssCursor()
|
|
|
54594
54675
|
this.IsShowClose=false; //Y轴始终显示收盘价
|
|
54595
54676
|
this.ClientPos=-1;
|
|
54596
54677
|
this.CallAcutionXOperator;
|
|
54678
|
+
|
|
54679
|
+
this.EnableKeyboard=false; //是否支持键盘隐藏显示
|
|
54680
|
+
this.OnChangeStatusCallback; //状态切换以后回调
|
|
54597
54681
|
|
|
54598
54682
|
|
|
54599
54683
|
this.RightButton=
|
|
@@ -55772,6 +55856,29 @@ function ChartCorssCursor()
|
|
|
55772
55856
|
|
|
55773
55857
|
this.Status=1;
|
|
55774
55858
|
}
|
|
55859
|
+
|
|
55860
|
+
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
55861
|
+
this.OnKeyDown=function(data)
|
|
55862
|
+
{
|
|
55863
|
+
if (!this.EnableKeyboard) return;
|
|
55864
|
+
|
|
55865
|
+
var keyID=data.KeyID;
|
|
55866
|
+
if (keyID==27) //ESC 隐藏十字线
|
|
55867
|
+
{
|
|
55868
|
+
if (!this.IsShowCorss) return;
|
|
55869
|
+
this.IsShowCorss=false;
|
|
55870
|
+
data.Draw=true;
|
|
55871
|
+
if (this.OnChangeStatusCallback) this.OnChangeStatusCallback({ Type:1, IsShowCorss:this.IsShowCorss }, this);
|
|
55872
|
+
}
|
|
55873
|
+
else if (keyID==37 || keyID==39) //left, right 显示十字线
|
|
55874
|
+
{
|
|
55875
|
+
if (this.IsShowCorss) return;
|
|
55876
|
+
this.IsShowCorss=true;
|
|
55877
|
+
data.Draw=true;
|
|
55878
|
+
if (this.OnChangeStatusCallback) this.OnChangeStatusCallback({ Type:1, IsShowCorss:this.IsShowCorss }, this);
|
|
55879
|
+
}
|
|
55880
|
+
}
|
|
55881
|
+
|
|
55775
55882
|
}
|
|
55776
55883
|
|
|
55777
55884
|
|
|
@@ -72822,6 +72929,18 @@ function JSChartResource()
|
|
|
72822
72929
|
LineHeight:25 //单行高度
|
|
72823
72930
|
};
|
|
72824
72931
|
|
|
72932
|
+
this.DialogTooltip=
|
|
72933
|
+
{
|
|
72934
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
72935
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
72936
|
+
TitleColor:'rgb(0,0,0)', //标题颜色
|
|
72937
|
+
VolColor:"rgb(255, 185, 15)", //标题成交量
|
|
72938
|
+
AmountColor:"rgb(79, 79, 79)", //成交金额
|
|
72939
|
+
DateTimeColor:'rgb(60,60,60)',
|
|
72940
|
+
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
72941
|
+
PositionColor:"rgb(43,54,69)" //持仓
|
|
72942
|
+
}
|
|
72943
|
+
|
|
72825
72944
|
//弹幕
|
|
72826
72945
|
this.Barrage= {
|
|
72827
72946
|
Font:16*GetDevicePixelRatio() +'px 微软雅黑', //字体
|
|
@@ -73804,6 +73923,21 @@ function JSChartResource()
|
|
|
73804
73923
|
if (item.AmountColor) this.PCTooltipPaint.AmountColor=item.AmountColor;
|
|
73805
73924
|
}
|
|
73806
73925
|
|
|
73926
|
+
if (style.DialogTooltip)
|
|
73927
|
+
{
|
|
73928
|
+
var item=style.DialogTooltip;
|
|
73929
|
+
if (item.BGColor) this.DialogTooltip.BGColor=item.BGColor;
|
|
73930
|
+
if (item.BorderColor) this.DialogTooltip.BorderColor=item.BorderColor;
|
|
73931
|
+
if (item.TitleColor) this.DialogTooltip.TitleColor=item.TitleColor;
|
|
73932
|
+
if (item.DateTimeColor) this.DialogTooltip.DateTimeColor=item.DateTimeColor;
|
|
73933
|
+
|
|
73934
|
+
if (item.VolColor) this.DialogTooltip.VolColor=item.VolColor;
|
|
73935
|
+
if (item.AmountColor) this.DialogTooltip.AmountColor=item.AmountColor;
|
|
73936
|
+
if (item.TurnoverRateColor) this.DialogTooltip.TurnoverRateColor=item.TurnoverRateColor;
|
|
73937
|
+
if (item.PositionColor) this.DialogTooltip.PositionColor=item.PositionColor;
|
|
73938
|
+
|
|
73939
|
+
}
|
|
73940
|
+
|
|
73807
73941
|
if (style.MinuteInfo)
|
|
73808
73942
|
{
|
|
73809
73943
|
var item=style.MinuteInfo;
|
|
@@ -74745,7 +74879,26 @@ function JSChartLocalization()
|
|
|
74745
74879
|
['DivTooltip-Amount', {CN:'金额:', EN:'Amount:', TC:'金額'}],
|
|
74746
74880
|
['DivTooltip-Exchange', {CN:'换手:', EN:'Exchange:', TC:'換手'}],
|
|
74747
74881
|
['DivTooltip-Position', {CN:'持仓:', EN:'Position:', TC:'持倉'}],
|
|
74748
|
-
['DivTooltip-Price', {CN:'价格:', EN:'
|
|
74882
|
+
['DivTooltip-Price', {CN:'价格:', EN:'Price:', TC:'價格'}],
|
|
74883
|
+
|
|
74884
|
+
['DialogTooltip-Date', {CN:'日期', EN:'Date', TC:'日期'}],
|
|
74885
|
+
['DialogTooltip-Time', {CN:'时间', EN:'Time', TC:'時間'}],
|
|
74886
|
+
['DialogTooltip-Open', {CN:'开盘价', EN:'Open', TC:'開盤價'}],
|
|
74887
|
+
['DialogTooltip-High', {CN:'最高价', EN:'High', TC:'最高價'}],
|
|
74888
|
+
['DialogTooltip-Low', {CN:'最低价', EN:'Low', TC:'最低價'}],
|
|
74889
|
+
['DialogTooltip-Close', {CN:'收盘价', EN:'Close', TC:'收盤價'}],
|
|
74890
|
+
['DialogTooltip-Increase', {CN:'涨幅', EN:'Increase', TC:'漲幅'}],
|
|
74891
|
+
['DialogTooltip-Risefall', {CN:'涨跌', EN:'Risefall', TC:'漲跌'}],
|
|
74892
|
+
['DialogTooltip-Vol', {CN:'成交量', EN:'Volume', TC:'數量'}],
|
|
74893
|
+
['DialogTooltip-Amount', {CN:'成交额', EN:'Amount', TC:'金額'}],
|
|
74894
|
+
['DialogTooltip-Exchange', {CN:'换手率', EN:'Exchange', TC:'換手'}],
|
|
74895
|
+
['DialogTooltip-Position', {CN:'持仓量', EN:'Position', TC:'持倉'}],
|
|
74896
|
+
['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
|
|
74897
|
+
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
|
|
74898
|
+
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
74899
|
+
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
74900
|
+
['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
|
|
74901
|
+
['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
|
|
74749
74902
|
|
|
74750
74903
|
//走势图PC tooltip
|
|
74751
74904
|
['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
|
|
@@ -76497,6 +76650,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76497
76650
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
76498
76651
|
this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
|
|
76499
76652
|
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
76653
|
+
this.ChartCorssCursor.OnChangeStatusCallback=(data, obj)=>{ this.OnChangeCorssCursorStatus(data,obj); }
|
|
76500
76654
|
|
|
76501
76655
|
//创建等待提示
|
|
76502
76656
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -83031,6 +83185,42 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83031
83185
|
|
|
83032
83186
|
this.Draw();
|
|
83033
83187
|
}
|
|
83188
|
+
|
|
83189
|
+
this.DrawTooltipDialog=function()
|
|
83190
|
+
{
|
|
83191
|
+
if (!this.DialogTooltip) return;
|
|
83192
|
+
|
|
83193
|
+
this.UpdateTooltipDialog();
|
|
83194
|
+
}
|
|
83195
|
+
|
|
83196
|
+
this.UpdateTooltipDialog=function()
|
|
83197
|
+
{
|
|
83198
|
+
if (!this.DialogTooltip) return false;
|
|
83199
|
+
if (!this.ChartCorssCursor) return false;
|
|
83200
|
+
|
|
83201
|
+
var kItem=null;
|
|
83202
|
+
if (this.ChartCorssCursor.ClientPos>=0)
|
|
83203
|
+
{
|
|
83204
|
+
var hisData=this.ChartOperator_Temp_GetHistroyData();;
|
|
83205
|
+
if (!hisData) return false; //数据还没有到达
|
|
83206
|
+
|
|
83207
|
+
var dataIndex=hisData.DataOffset+this.ChartCorssCursor.CursorIndex;
|
|
83208
|
+
var kItem=hisData.Data[dataIndex];
|
|
83209
|
+
}
|
|
83210
|
+
|
|
83211
|
+
var sendData=
|
|
83212
|
+
{
|
|
83213
|
+
ClientPos:this.ChartCorssCursor.ClientPos, //位置
|
|
83214
|
+
IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
|
|
83215
|
+
KItem:kItem,
|
|
83216
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
83217
|
+
};
|
|
83218
|
+
|
|
83219
|
+
|
|
83220
|
+
this.DialogTooltip.Update(sendData);
|
|
83221
|
+
|
|
83222
|
+
return true;
|
|
83223
|
+
}
|
|
83034
83224
|
}
|
|
83035
83225
|
|
|
83036
83226
|
//API 返回数据 转化为array[]
|
|
@@ -84711,6 +84901,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84711
84901
|
}
|
|
84712
84902
|
|
|
84713
84903
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
84904
|
+
|
|
84905
|
+
var draw=false;
|
|
84906
|
+
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
84907
|
+
{
|
|
84908
|
+
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
84909
|
+
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
84910
|
+
draw=sendData.Draw;
|
|
84911
|
+
}
|
|
84912
|
+
|
|
84714
84913
|
switch(keyID)
|
|
84715
84914
|
{
|
|
84716
84915
|
case 37: //left
|
|
@@ -84816,10 +85015,20 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84816
85015
|
this.ChartOperator(option);
|
|
84817
85016
|
}
|
|
84818
85017
|
break;
|
|
85018
|
+
case 27:
|
|
85019
|
+
if (this.CurrentChartDrawPicture)
|
|
85020
|
+
{
|
|
85021
|
+
var drawPicture=this.CurrentChartDrawPicture;
|
|
85022
|
+
if (drawPicture.Status!=20) //画布移动的时候不能取消
|
|
85023
|
+
this.CurrentChartDrawPicture=null;
|
|
85024
|
+
}
|
|
85025
|
+
break;
|
|
84819
85026
|
default:
|
|
84820
85027
|
return;
|
|
84821
85028
|
}
|
|
84822
85029
|
|
|
85030
|
+
if (draw) this.DrawDynamicInfo();
|
|
85031
|
+
|
|
84823
85032
|
//不让滚动条滚动
|
|
84824
85033
|
if(e.preventDefault) e.preventDefault();
|
|
84825
85034
|
else e.returnValue = false;
|
|
@@ -88766,6 +88975,55 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88766
88975
|
|
|
88767
88976
|
return null;
|
|
88768
88977
|
}
|
|
88978
|
+
|
|
88979
|
+
this.DrawTooltipDialog=function()
|
|
88980
|
+
{
|
|
88981
|
+
if (!this.DialogTooltip) return;
|
|
88982
|
+
|
|
88983
|
+
this.UpdateTooltipDialog();
|
|
88984
|
+
}
|
|
88985
|
+
|
|
88986
|
+
this.UpdateTooltipDialog=function()
|
|
88987
|
+
{
|
|
88988
|
+
if (!this.DialogTooltip) return false;
|
|
88989
|
+
if (!this.ChartCorssCursor) return false;
|
|
88990
|
+
|
|
88991
|
+
var minuteItem=null; //{ Type:0=连续交易 1=集合竞价, Data:数据 }
|
|
88992
|
+
if (this.ChartCorssCursor.ClientPos>=0)
|
|
88993
|
+
{
|
|
88994
|
+
var titlePaint=this.TitlePaint[0];
|
|
88995
|
+
if (titlePaint && titlePaint.PointInfo)
|
|
88996
|
+
{
|
|
88997
|
+
var pointInfo=titlePaint.PointInfo;
|
|
88998
|
+
if ((pointInfo.ClientPos==2 || pointInfo.ClientPos==3 || (pointInfo.ClientPos>=200&& pointInfo.ClientPos<=299) || (pointInfo.ClientPos>=300&& pointInfo.ClientPos<=399)))
|
|
88999
|
+
{
|
|
89000
|
+
var auctionData=titlePaint.GetCurrentAuctionData();
|
|
89001
|
+
if (!auctionData) return;
|
|
89002
|
+
minuteItem={ Type:1, Data:auctionData };
|
|
89003
|
+
}
|
|
89004
|
+
else
|
|
89005
|
+
{
|
|
89006
|
+
var minuteData=titlePaint.GetCurrentKLineData();
|
|
89007
|
+
if (!minuteData) return;
|
|
89008
|
+
minuteItem={ Type:0, Data:minuteData };
|
|
89009
|
+
}
|
|
89010
|
+
}
|
|
89011
|
+
|
|
89012
|
+
}
|
|
89013
|
+
|
|
89014
|
+
var sendData=
|
|
89015
|
+
{
|
|
89016
|
+
ClientPos:this.ChartCorssCursor.ClientPos, //位置
|
|
89017
|
+
IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
|
|
89018
|
+
MinItem:minuteItem,
|
|
89019
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
89020
|
+
};
|
|
89021
|
+
|
|
89022
|
+
|
|
89023
|
+
this.DialogTooltip.Update(sendData);
|
|
89024
|
+
|
|
89025
|
+
return true;
|
|
89026
|
+
}
|
|
88769
89027
|
}
|
|
88770
89028
|
|
|
88771
89029
|
//盘前数据
|
|
@@ -119946,6 +120204,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
119946
120204
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
119947
120205
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
119948
120206
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
120207
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
119949
120208
|
if (varItem.LineWidth)
|
|
119950
120209
|
{
|
|
119951
120210
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -119957,9 +120216,21 @@ function ScriptIndex(name,script,args,option)
|
|
|
119957
120216
|
chart.HistoryData=hisData;
|
|
119958
120217
|
this.ReloadChartResource(hqChart,windowIndex,chart);
|
|
119959
120218
|
|
|
119960
|
-
|
|
119961
|
-
|
|
119962
|
-
|
|
120219
|
+
if (varItem.IsShowTitle===false) //NOTEXT 不绘制标题
|
|
120220
|
+
{
|
|
120221
|
+
|
|
120222
|
+
}
|
|
120223
|
+
else if (IFrameSplitOperator.IsString(varItem.Name) && varItem.Name.indexOf("NOTEXT")==0) //标题中包含NOTEXT不绘制标题
|
|
120224
|
+
{
|
|
120225
|
+
|
|
120226
|
+
}
|
|
120227
|
+
else
|
|
120228
|
+
{
|
|
120229
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
120230
|
+
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
120231
|
+
this.SetTitleData(titleData,chart);
|
|
120232
|
+
}
|
|
120233
|
+
|
|
119963
120234
|
this.SetChartIndexName(chart);
|
|
119964
120235
|
hqChart.ChartPaint.push(chart);
|
|
119965
120236
|
}
|
|
@@ -121905,6 +122176,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
121905
122176
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
121906
122177
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
121907
122178
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
122179
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
121908
122180
|
if (varItem.LineWidth)
|
|
121909
122181
|
{
|
|
121910
122182
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -123333,6 +123605,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
123333
123605
|
if (IFrameSplitOperator.IsBool(item.isDotLine)) outVarItem.IsDotLine = item.isDotLine;
|
|
123334
123606
|
if (IFrameSplitOperator.IsNonEmptyArray(item.lineDash)) outVarItem.LineDash=item.lineDash;
|
|
123335
123607
|
if (IFrameSplitOperator.IsBool(item.isSingleLine)) outVarItem.IsSingleLine=item.isSingleLine;
|
|
123608
|
+
if (IFrameSplitOperator.IsNumber(item.StickType)) outVarItem.StickType=item.StickType;
|
|
123609
|
+
if (IFrameSplitOperator.IsNumber(item.BarColorType)) outVarItem.BarColorType=item.BarColorType;
|
|
123336
123610
|
|
|
123337
123611
|
result.push(outVarItem);
|
|
123338
123612
|
}
|
|
@@ -125065,7 +125339,19 @@ function GetBlackStyle()
|
|
|
125065
125339
|
VolColor:"rgb(161,154,3)", //标题成交量
|
|
125066
125340
|
AmountColor:"rgb(161,154,3)", //成交金额
|
|
125067
125341
|
},
|
|
125068
|
-
|
|
125342
|
+
|
|
125343
|
+
DialogTooltip:
|
|
125344
|
+
{
|
|
125345
|
+
BGColor:'rgb(20,20,20)', //背景色
|
|
125346
|
+
BorderColor:'rgb(170,170,170)', //边框颜色
|
|
125347
|
+
TitleColor:'rgb(210,210,210)', //标题颜色
|
|
125348
|
+
VolColor:"rgb(255, 185, 15)", //标题成交量
|
|
125349
|
+
AmountColor:"rgb(210,210,210)", //成交金额
|
|
125350
|
+
DateTimeColor:'rgb(210,210,210)',
|
|
125351
|
+
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
125352
|
+
PositionColor:"rgb(43,54,69)" //持仓
|
|
125353
|
+
},
|
|
125354
|
+
|
|
125069
125355
|
//走势图 信息地雷
|
|
125070
125356
|
MinuteInfo:
|
|
125071
125357
|
{
|
|
@@ -138507,7 +138793,7 @@ function ScrollBarBGChart()
|
|
|
138507
138793
|
|
|
138508
138794
|
|
|
138509
138795
|
|
|
138510
|
-
var HQCHART_VERSION="1.1.
|
|
138796
|
+
var HQCHART_VERSION="1.1.13914";
|
|
138511
138797
|
|
|
138512
138798
|
function PrintHQChartVersion()
|
|
138513
138799
|
{
|
|
@@ -56000,7 +56000,7 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
56000
56000
|
|
|
56001
56001
|
//生成随机测试数据
|
|
56002
56002
|
var price=kItem[5];
|
|
56003
|
-
var value=Math.ceil(Math.random()*10)/
|
|
56003
|
+
var value=Math.ceil(Math.random()*10)/5000*price;
|
|
56004
56004
|
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
56005
56005
|
|
|
56006
56006
|
if (bUp) price+=value;
|