hqchart 1.1.14696 → 1.1.14705
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.
|
@@ -4569,6 +4569,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4569
4569
|
}
|
|
4570
4570
|
}
|
|
4571
4571
|
|
|
4572
|
+
if (option.FastSlide)
|
|
4573
|
+
{
|
|
4574
|
+
var item=option.FastSlide;
|
|
4575
|
+
if (IFrameSplitOperator.IsNumber(item.MinDistance)) chart.FastSlideConfig.MinDistance=item.MinDistance;
|
|
4576
|
+
if (IFrameSplitOperator.IsNumber(item.MinSpeed)) chart.FastSlideConfig.MinSpeed=item.MinSpeed;
|
|
4577
|
+
if (IFrameSplitOperator.IsNumber(item.MaxTime)) chart.FastSlideConfig.MaxTime=item.MaxTime;
|
|
4578
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4572
4581
|
if (chart.ClassName=="KLineChartContainer")
|
|
4573
4582
|
{
|
|
4574
4583
|
if (!option.DragSelectRect)
|
|
@@ -4637,6 +4646,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4637
4646
|
if (IFrameSplitOperator.IsBool(item.RightButton.Enable)) chart.ChartCorssCursor.RightButton.Enable=item.RightButton.Enable;
|
|
4638
4647
|
}
|
|
4639
4648
|
|
|
4649
|
+
if (item.BottomButton)
|
|
4650
|
+
{
|
|
4651
|
+
var subItem=item.BottomButton;
|
|
4652
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) chart.ChartCorssCursor.BottomButton.Enable=subItem.Enable;
|
|
4653
|
+
}
|
|
4654
|
+
|
|
4640
4655
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
4641
4656
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
4642
4657
|
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
@@ -5121,6 +5136,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5121
5136
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
5122
5137
|
}
|
|
5123
5138
|
|
|
5139
|
+
if (option.FastSlide)
|
|
5140
|
+
{
|
|
5141
|
+
var item=option.FastSlide;
|
|
5142
|
+
if (IFrameSplitOperator.IsNumber(item.MinDistance)) chart.FastSlideConfig.MinDistance=item.MinDistance;
|
|
5143
|
+
if (IFrameSplitOperator.IsNumber(item.MinSpeed)) chart.FastSlideConfig.MinSpeed=item.MinSpeed;
|
|
5144
|
+
if (IFrameSplitOperator.IsNumber(item.MaxTime)) chart.FastSlideConfig.MaxTime=item.MaxTime;
|
|
5145
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
5146
|
+
}
|
|
5147
|
+
|
|
5124
5148
|
//分页
|
|
5125
5149
|
if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
|
|
5126
5150
|
|
|
@@ -5142,6 +5166,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5142
5166
|
if (IFrameSplitOperator.IsBool(item.RightButton.Enable)) chart.ChartCorssCursor.RightButton.Enable=item.RightButton.Enable;
|
|
5143
5167
|
}
|
|
5144
5168
|
|
|
5169
|
+
if (item.BottomButton)
|
|
5170
|
+
{
|
|
5171
|
+
var subItem=item.BottomButton;
|
|
5172
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) chart.ChartCorssCursor.BottomButton.Enable=subItem.Enable;
|
|
5173
|
+
}
|
|
5174
|
+
|
|
5145
5175
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
5146
5176
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
5147
5177
|
|
|
@@ -6879,7 +6909,9 @@ var JSCHART_EVENT_ID=
|
|
|
6879
6909
|
|
|
6880
6910
|
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
6881
6911
|
|
|
6882
|
-
ON_TOUCH_FAST_SLIDE:169 //快速滑动
|
|
6912
|
+
ON_TOUCH_FAST_SLIDE:169, //快速滑动
|
|
6913
|
+
|
|
6914
|
+
ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
|
|
6883
6915
|
}
|
|
6884
6916
|
|
|
6885
6917
|
var JSCHART_OPERATOR_ID=
|
|
@@ -6908,6 +6940,8 @@ var JSCHART_OPERATOR_ID=
|
|
|
6908
6940
|
|
|
6909
6941
|
OP_GOTO:16, //移动到某一个天或某一个分钟
|
|
6910
6942
|
OP_GOTO_BY_DATAINDEX:17, //的移动到某一个数据起始位置
|
|
6943
|
+
|
|
6944
|
+
OP_MOVE_CORSSCURSOR:18, //移动十字光标 { Step, Start:{ Date:, Time: } }
|
|
6911
6945
|
}
|
|
6912
6946
|
|
|
6913
6947
|
var JSCHART_DRAG_ID=
|
|
@@ -7309,7 +7343,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7309
7343
|
this.EnableVerticalDrag=false;
|
|
7310
7344
|
|
|
7311
7345
|
//十字光标长留(手势才有)
|
|
7312
|
-
this.ClickModel={ IsShowCorssCursor:false };
|
|
7346
|
+
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false }; //PreventHide 阻止隐藏十字光标
|
|
7313
7347
|
this.EnableClickModel=false;
|
|
7314
7348
|
|
|
7315
7349
|
//标题栏显示最新数据
|
|
@@ -7340,7 +7374,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7340
7374
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7341
7375
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7342
7376
|
|
|
7343
|
-
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250 }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7377
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7344
7378
|
|
|
7345
7379
|
this.RestoreFocus=function(delay)
|
|
7346
7380
|
{
|
|
@@ -7934,11 +7968,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7934
7968
|
var button=this.ChartCorssCursor.PtInButton(x,y);
|
|
7935
7969
|
if (!button) return false;
|
|
7936
7970
|
|
|
7937
|
-
|
|
7938
|
-
if (event && event.Callback)
|
|
7971
|
+
if (button.Type==1)
|
|
7939
7972
|
{
|
|
7940
|
-
var
|
|
7941
|
-
event.Callback
|
|
7973
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_RIGHT);
|
|
7974
|
+
if (event && event.Callback)
|
|
7975
|
+
{
|
|
7976
|
+
var sendData={ Button:button, e };
|
|
7977
|
+
event.Callback(event,sendData,this);
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
else if (button.Type==2)
|
|
7981
|
+
{
|
|
7982
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_BOTTOM);
|
|
7983
|
+
if (event && event.Callback)
|
|
7984
|
+
{
|
|
7985
|
+
var sendData={ Button:button, e };
|
|
7986
|
+
event.Callback(event,sendData,this);
|
|
7987
|
+
}
|
|
7942
7988
|
}
|
|
7943
7989
|
|
|
7944
7990
|
return true;
|
|
@@ -9448,6 +9494,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9448
9494
|
return true;
|
|
9449
9495
|
}
|
|
9450
9496
|
|
|
9497
|
+
if (this.TryClickCrossCursor(x,y))
|
|
9498
|
+
{
|
|
9499
|
+
return true;
|
|
9500
|
+
}
|
|
9501
|
+
|
|
9451
9502
|
return false;
|
|
9452
9503
|
}
|
|
9453
9504
|
|
|
@@ -9460,6 +9511,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9460
9511
|
this.TouchDrawCount=0;
|
|
9461
9512
|
this.PhonePinch=null;
|
|
9462
9513
|
this.TouchDrag=null;
|
|
9514
|
+
if (this.ClickModel) this.ClickModel.PreventHide=false;
|
|
9463
9515
|
this.StopDragTimer();
|
|
9464
9516
|
|
|
9465
9517
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9474,7 +9526,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9474
9526
|
var touches = this.GetToucheData(e, this.IsForceLandscape);
|
|
9475
9527
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
9476
9528
|
|
|
9477
|
-
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9529
|
+
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9530
|
+
return;
|
|
9478
9531
|
|
|
9479
9532
|
if (this.EnableVerticalDrag )
|
|
9480
9533
|
{
|
|
@@ -10846,6 +10899,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10846
10899
|
{
|
|
10847
10900
|
if (this.TouchStatus.CorssCursorShow==true) this.ChartCorssCursor.Draw();
|
|
10848
10901
|
}
|
|
10902
|
+
else if (this.EnableClickModel)
|
|
10903
|
+
{
|
|
10904
|
+
if (this.ClickModel.IsShowCorssCursor===true) this.ChartCorssCursor.Draw();
|
|
10905
|
+
}
|
|
10849
10906
|
else if (this.IsOnTouch===false && this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.IsShowCorssCursor===true) //开始绘图
|
|
10850
10907
|
{
|
|
10851
10908
|
this.ChartCorssCursor.Draw();
|
|
@@ -15711,11 +15768,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15711
15768
|
{
|
|
15712
15769
|
if (!this.TouchDrag) return false;
|
|
15713
15770
|
if (!this.FastSlideConfig) return false;
|
|
15771
|
+
var config=this.FastSlideConfig;
|
|
15772
|
+
if (!config.Enable) return false;
|
|
15714
15773
|
|
|
15715
15774
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);
|
|
15716
15775
|
if (!event || !event.Callback) return false;
|
|
15717
15776
|
|
|
15718
|
-
|
|
15777
|
+
|
|
15719
15778
|
var drag=this.TouchDrag;
|
|
15720
15779
|
var time=Date.now();
|
|
15721
15780
|
var spanTime=time-drag.StartTime;
|
|
@@ -44298,7 +44357,7 @@ function ChartMinuteBuySellBar()
|
|
|
44298
44357
|
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44299
44358
|
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44300
44359
|
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44301
|
-
this.
|
|
44360
|
+
this.AryBarRange=g_JSChartResource.Minute.BuySellBar.AryBarRange;
|
|
44302
44361
|
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44303
44362
|
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44304
44363
|
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
@@ -44313,7 +44372,7 @@ function ChartMinuteBuySellBar()
|
|
|
44313
44372
|
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44314
44373
|
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44315
44374
|
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44316
|
-
this.
|
|
44375
|
+
this.AryBarRange=g_JSChartResource.Minute.BuySellBar.AryBarRange;
|
|
44317
44376
|
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44318
44377
|
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44319
44378
|
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
@@ -44329,11 +44388,29 @@ function ChartMinuteBuySellBar()
|
|
|
44329
44388
|
var volRange=this.GetVolRange();
|
|
44330
44389
|
if (!volRange) return;
|
|
44331
44390
|
|
|
44391
|
+
var minData=this.HQChart.GetKData();
|
|
44392
|
+
if (!minData || !IFrameSplitOperator.IsNonEmptyArray(minData.Data)) return;
|
|
44393
|
+
|
|
44332
44394
|
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
44333
44395
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
44396
|
+
var minuteCount=this.ChartFrame.MinuteCount;
|
|
44397
|
+
var minIndex=(minData.Data.length-1)%minuteCount;
|
|
44334
44398
|
|
|
44335
|
-
var
|
|
44336
|
-
var
|
|
44399
|
+
var startIndex=xPointCount-1-120;
|
|
44400
|
+
var endIndex=xPointCount-1;
|
|
44401
|
+
for(var i=0;i<this.AryBarRange.length;++i)
|
|
44402
|
+
{
|
|
44403
|
+
var item=this.AryBarRange[i];
|
|
44404
|
+
if (minIndex<(minuteCount-1-item.End))
|
|
44405
|
+
{
|
|
44406
|
+
startIndex=xPointCount-1-item.Start;
|
|
44407
|
+
endIndex=xPointCount-1-item.End;
|
|
44408
|
+
break;
|
|
44409
|
+
}
|
|
44410
|
+
}
|
|
44411
|
+
|
|
44412
|
+
var xStart=this.ChartFrame.GetXFromIndex(startIndex);
|
|
44413
|
+
var xEnd=this.ChartFrame.GetXFromIndex(endIndex);
|
|
44337
44414
|
|
|
44338
44415
|
function _Temp_GetXFromData(value)
|
|
44339
44416
|
{
|
|
@@ -59929,6 +60006,12 @@ function ChartCorssCursor()
|
|
|
59929
60006
|
Icon:g_JSChartResource.CorssCursor.RightButton.Icon
|
|
59930
60007
|
};
|
|
59931
60008
|
|
|
60009
|
+
//底部按钮
|
|
60010
|
+
this.BottomButton=
|
|
60011
|
+
{
|
|
60012
|
+
Enable:false, Rect:null,
|
|
60013
|
+
}
|
|
60014
|
+
|
|
59932
60015
|
this.RightMargin=CloneData(g_JSChartResource.CorssCursor.RightMargin);
|
|
59933
60016
|
this.BottomConfig=CloneData(g_JSChartResource.CorssCursor.BottomText); //底部输出配置
|
|
59934
60017
|
this.LeftConfig=CloneData(g_JSChartResource.CorssCursor.LeftText);
|
|
@@ -60132,6 +60215,7 @@ function ChartCorssCursor()
|
|
|
60132
60215
|
{
|
|
60133
60216
|
this.Status=0;
|
|
60134
60217
|
this.RightButton.Rect=null;
|
|
60218
|
+
this.BottomButton.Rect=null;
|
|
60135
60219
|
this.LastValue=null;
|
|
60136
60220
|
|
|
60137
60221
|
if (!this.LastPoint) return;
|
|
@@ -60537,6 +60621,11 @@ function ChartCorssCursor()
|
|
|
60537
60621
|
this.Canvas.textBaseline="bottom";
|
|
60538
60622
|
this.Canvas.fillStyle=this.TextColor;
|
|
60539
60623
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
|
|
60624
|
+
|
|
60625
|
+
var buttonData={X:x, Y:y, XValue:xValue, FrameID:yValueExtend.FrameID };
|
|
60626
|
+
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
60627
|
+
this.BottomButton.Rect=rtBG;
|
|
60628
|
+
this.BottomButton.Data=buttonData;
|
|
60540
60629
|
}
|
|
60541
60630
|
}
|
|
60542
60631
|
|
|
@@ -60756,17 +60845,42 @@ function ChartCorssCursor()
|
|
|
60756
60845
|
}
|
|
60757
60846
|
|
|
60758
60847
|
this.PtInButton=function(x,y)
|
|
60848
|
+
{
|
|
60849
|
+
var item=this.PtInRightButton(x,y);
|
|
60850
|
+
if (item) return item;
|
|
60851
|
+
|
|
60852
|
+
item=this.PtInButtomButton(x,y);
|
|
60853
|
+
if (item) return item;
|
|
60854
|
+
|
|
60855
|
+
return null;
|
|
60856
|
+
}
|
|
60857
|
+
|
|
60858
|
+
this.PtInRightButton=function(x,y)
|
|
60759
60859
|
{
|
|
60760
60860
|
if (!this.RightButton.Enable) return null;
|
|
60761
60861
|
if (!this.RightButton.Rect) return null;
|
|
60762
60862
|
|
|
60763
60863
|
var rect=this.RightButton.Rect;
|
|
60764
|
-
|
|
60765
|
-
this.Canvas.rect(rect.Left,rect.Top,rect.Width,rect.Height);
|
|
60766
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
60864
|
+
if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom)
|
|
60767
60865
|
{
|
|
60768
|
-
return { Data:this.RightButton.Data, Rect:rect };
|
|
60866
|
+
return { Data:this.RightButton.Data, Rect:rect, Type:1 }; //Type:1=右侧 2=底部
|
|
60769
60867
|
}
|
|
60868
|
+
|
|
60869
|
+
return null;
|
|
60870
|
+
}
|
|
60871
|
+
|
|
60872
|
+
this.PtInButtomButton=function(x,y)
|
|
60873
|
+
{
|
|
60874
|
+
if (!this.BottomButton.Enable) return null;
|
|
60875
|
+
if (!this.BottomButton.Rect) return null;
|
|
60876
|
+
|
|
60877
|
+
var rect=this.BottomButton.Rect;
|
|
60878
|
+
if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom)
|
|
60879
|
+
{
|
|
60880
|
+
return { Data:this.BottomButton.Data, Rect:rect , Type:2 }; //Type:1=右侧 2=底部
|
|
60881
|
+
}
|
|
60882
|
+
|
|
60883
|
+
return null;
|
|
60770
60884
|
}
|
|
60771
60885
|
|
|
60772
60886
|
this.DrawTextBGRect=function(x,y, height, width)
|
|
@@ -61814,9 +61928,11 @@ function HQDateStringFormat()
|
|
|
61814
61928
|
|
|
61815
61929
|
this.DateFormatType=0; //0=YYYY-MM-DD 1=YYYY/MM/DD 2=YYYY/MM/DD/W 3=DD/MM/YYYY
|
|
61816
61930
|
this.LanguageID=0;
|
|
61931
|
+
this.KItem=null; //缓存当前的K线
|
|
61817
61932
|
|
|
61818
61933
|
this.Operator=function()
|
|
61819
61934
|
{
|
|
61935
|
+
this.KItem=null;
|
|
61820
61936
|
if (!IFrameSplitOperator.IsNumber(this.Value)) return false;
|
|
61821
61937
|
if (!this.Data) return false;
|
|
61822
61938
|
|
|
@@ -61824,6 +61940,7 @@ function HQDateStringFormat()
|
|
|
61824
61940
|
index=parseInt(index.toFixed(0));
|
|
61825
61941
|
if (this.Data.DataOffset+index>=this.Data.Data.length) return false;
|
|
61826
61942
|
var currentData = this.Data.Data[this.Data.DataOffset+index];
|
|
61943
|
+
this.KItem=currentData;
|
|
61827
61944
|
var dateFormatString="YYYY-MM-DD";
|
|
61828
61945
|
if (this.DateFormatType==1) dateFormatString="YYYY/MM/DD";
|
|
61829
61946
|
else if (this.DateFormatType==2) dateFormatString="YYYY/MM/DD/W";
|
|
@@ -78003,6 +78120,8 @@ function JSChartResource()
|
|
|
78003
78120
|
YOffset:1,
|
|
78004
78121
|
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
78005
78122
|
TextColor:"rgb(128,128,128)",
|
|
78123
|
+
|
|
78124
|
+
AryBarRange:[{ Start:240, End:120 }, { Start:120, End:0}],
|
|
78006
78125
|
}
|
|
78007
78126
|
|
|
78008
78127
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
@@ -79553,7 +79672,7 @@ function JSChartResource()
|
|
|
79553
79672
|
if (item.Font) dest.Font=item.Font;
|
|
79554
79673
|
if (item.TextColor) dest.TextColor=item.TextColor;
|
|
79555
79674
|
if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
|
|
79556
|
-
if (IFrameSplitOperator.
|
|
79675
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryBarRange)) dest.AryBarRange=item.AryBarRange;
|
|
79557
79676
|
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
|
|
79558
79677
|
}
|
|
79559
79678
|
}
|
|
@@ -82766,33 +82885,179 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82766
82885
|
return;
|
|
82767
82886
|
}
|
|
82768
82887
|
|
|
82888
|
+
return this.ChartOperator_Temp_SetChartCorssCursor(findIndex, item);
|
|
82889
|
+
}
|
|
82890
|
+
else if (id==JSCHART_OPERATOR_ID.OP_MOVE_CORSSCURSOR) //移动十字光标 { Step, Start:{ Date, Time }}
|
|
82891
|
+
{
|
|
82892
|
+
if (!IFrameSplitOperator.IsNumber(obj.Step)) return false;
|
|
82893
|
+
if (obj.Step==0) return false;
|
|
82894
|
+
var step=obj.Step;
|
|
82895
|
+
|
|
82769
82896
|
if (!this.Frame || !this.Frame.SubFrame[0] || !this.Frame.SubFrame[0].Frame) return false;
|
|
82770
|
-
var
|
|
82897
|
+
var showCount=this.Frame.SubFrame[0].Frame.XPointCount; //一屏显示个数
|
|
82771
82898
|
|
|
82772
|
-
var
|
|
82773
|
-
|
|
82899
|
+
var kData=this.GetKData();
|
|
82900
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false; //数据还没有到达
|
|
82774
82901
|
|
|
82775
|
-
|
|
82776
|
-
var
|
|
82777
|
-
|
|
82778
|
-
|
|
82902
|
+
var start=kData.DataOffset;
|
|
82903
|
+
var bDayPeriod=ChartData.IsDayPeriod(this.Period,true);
|
|
82904
|
+
var findItem=null, dataIndex=-1;
|
|
82905
|
+
for(var i=0; i<kData.Data.length; ++i)
|
|
82906
|
+
{
|
|
82907
|
+
var item=kData.Data[i];
|
|
82908
|
+
if (!item) continue;
|
|
82779
82909
|
|
|
82780
|
-
|
|
82781
|
-
|
|
82782
|
-
|
|
82910
|
+
if (bDayPeriod)
|
|
82911
|
+
{
|
|
82912
|
+
if (item.Date==obj.Start.Date)
|
|
82913
|
+
{
|
|
82914
|
+
findItem=item;
|
|
82915
|
+
dataIndex=i;
|
|
82916
|
+
break;
|
|
82917
|
+
}
|
|
82918
|
+
}
|
|
82919
|
+
else
|
|
82920
|
+
{
|
|
82921
|
+
if (item.Date==obj.Start.Date && item.Time==obj.Start.Time)
|
|
82922
|
+
{
|
|
82923
|
+
findItem=item;
|
|
82924
|
+
dataIndex=i;
|
|
82925
|
+
break;
|
|
82926
|
+
}
|
|
82927
|
+
}
|
|
82928
|
+
}
|
|
82783
82929
|
|
|
82784
|
-
|
|
82930
|
+
if (!findItem) return false;
|
|
82785
82931
|
|
|
82786
|
-
var
|
|
82787
|
-
|
|
82788
|
-
|
|
82789
|
-
|
|
82790
|
-
|
|
82791
|
-
|
|
82792
|
-
|
|
82932
|
+
var index=-1;
|
|
82933
|
+
var dataOffset=kData.DataOffset;
|
|
82934
|
+
if (dataIndex>=start && dataIndex<=start+(showCount-1))
|
|
82935
|
+
{
|
|
82936
|
+
index=dataIndex-start;
|
|
82937
|
+
}
|
|
82938
|
+
else //需要调整当前屏范围
|
|
82939
|
+
{
|
|
82940
|
+
if (step>0)
|
|
82941
|
+
{
|
|
82942
|
+
if (dataIndex+showCount>=kData.Data.length)
|
|
82943
|
+
{
|
|
82944
|
+
dataOffset=kData.Data.length-showCount;
|
|
82945
|
+
index=dataIndex-dataOffset;
|
|
82946
|
+
}
|
|
82947
|
+
else
|
|
82948
|
+
{
|
|
82949
|
+
index=0;
|
|
82950
|
+
dataOffset=dataIndex;
|
|
82951
|
+
}
|
|
82952
|
+
}
|
|
82953
|
+
else
|
|
82954
|
+
{
|
|
82955
|
+
if (dataIndex-showCount<0)
|
|
82956
|
+
{
|
|
82957
|
+
dataOffset=0;
|
|
82958
|
+
index=dataIndex;
|
|
82959
|
+
}
|
|
82960
|
+
else if (dataIndex+showCount>=kData.Data.length)
|
|
82961
|
+
{
|
|
82962
|
+
dataOffset=kData.Data.length-showCount;
|
|
82963
|
+
index=dataIndex-dataOffset;
|
|
82964
|
+
}
|
|
82965
|
+
else
|
|
82966
|
+
{
|
|
82967
|
+
index=showCount;
|
|
82968
|
+
dataOffset=dataIndex-showCount;
|
|
82969
|
+
}
|
|
82970
|
+
}
|
|
82971
|
+
}
|
|
82972
|
+
|
|
82973
|
+
var kItem=findItem;
|
|
82974
|
+
if (step>0)
|
|
82975
|
+
{
|
|
82976
|
+
for(var i=dataIndex+1, j=0; i<kData.Data.length && j<step; ++i, ++j)
|
|
82977
|
+
{
|
|
82978
|
+
++index;
|
|
82979
|
+
dataIndex=i;
|
|
82980
|
+
if (index>=(showCount-1))
|
|
82981
|
+
{
|
|
82982
|
+
index=showCount-1;
|
|
82983
|
+
dataOffset+=1;
|
|
82984
|
+
}
|
|
82985
|
+
|
|
82986
|
+
var item=kData.Data[i];
|
|
82987
|
+
if (!item) continue;
|
|
82988
|
+
|
|
82989
|
+
var kItem=item;
|
|
82990
|
+
}
|
|
82991
|
+
}
|
|
82992
|
+
else if (step<0)
|
|
82993
|
+
{
|
|
82994
|
+
for(var i=dataIndex-1, j=0;i>=0 && j<Math.abs(step);--i, ++j)
|
|
82995
|
+
{
|
|
82996
|
+
--index
|
|
82997
|
+
dataIndex=i;
|
|
82998
|
+
if (index<=0)
|
|
82999
|
+
{
|
|
83000
|
+
index=0;
|
|
83001
|
+
dataOffset-=1;
|
|
83002
|
+
}
|
|
83003
|
+
|
|
83004
|
+
var item=kData.Data[i];
|
|
83005
|
+
if (!item) continue;
|
|
83006
|
+
var kItem=item;
|
|
83007
|
+
}
|
|
83008
|
+
}
|
|
83009
|
+
|
|
83010
|
+
if (!kItem) return false;
|
|
83011
|
+
|
|
83012
|
+
obj.KItem=kItem;
|
|
83013
|
+
if (kData.DataOffset==dataOffset)
|
|
83014
|
+
{
|
|
83015
|
+
return this.ChartOperator_Temp_SetChartCorssCursor(index, kItem);
|
|
83016
|
+
}
|
|
83017
|
+
else
|
|
83018
|
+
{
|
|
83019
|
+
kData.DataOffset=dataOffset
|
|
83020
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
83021
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
83022
|
+
this.ResetFrameXSplit();
|
|
83023
|
+
this.Frame.SetSizeChage(true);
|
|
83024
|
+
this.Draw();
|
|
83025
|
+
this.ChartOperator_Temp_SetChartCorssCursor(index, kItem);
|
|
83026
|
+
return true;
|
|
83027
|
+
}
|
|
82793
83028
|
}
|
|
82794
83029
|
}
|
|
82795
83030
|
|
|
83031
|
+
|
|
83032
|
+
this.ChartOperator_Temp_SetChartCorssCursor=function(index, kItem)
|
|
83033
|
+
{
|
|
83034
|
+
if (!this.Frame || !this.Frame.SubFrame[0] || !this.Frame.SubFrame[0].Frame) return false;
|
|
83035
|
+
var frame=this.Frame.SubFrame[0].Frame;
|
|
83036
|
+
|
|
83037
|
+
var x=frame.GetXFromIndex(index);
|
|
83038
|
+
var y=frame.GetYFromData(kItem.Close);
|
|
83039
|
+
|
|
83040
|
+
//保存最后一次鼠标移动信息
|
|
83041
|
+
var MoveStatus={ X:x, Y:y, IsInClient: this.IsMouseOnClient(x,y) };
|
|
83042
|
+
this.LastMouseStatus.OnMouseMove=MoveStatus;
|
|
83043
|
+
this.LastMouseStatus.MoveOnPoint={X:x, Y:y}; //鼠标移动的位置
|
|
83044
|
+
|
|
83045
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);
|
|
83046
|
+
var titleChart=this.TitlePaint[0];
|
|
83047
|
+
if (event && titleChart) titleChart.OnMouseMoveEvent=event;
|
|
83048
|
+
|
|
83049
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
83050
|
+
var e={ };
|
|
83051
|
+
e.clientX=(x/pixelTatio)+this.UIElement.getBoundingClientRect().left;
|
|
83052
|
+
e.clientY=(y/pixelTatio)+this.UIElement.getBoundingClientRect().top;
|
|
83053
|
+
this.MoveOnPoint={X:x, Y:y};
|
|
83054
|
+
this.OnMouseMove(x,y,e);
|
|
83055
|
+
this.LastMouseStatus.MoveOnPoint=null;
|
|
83056
|
+
if (titleChart) titleChart.OnMouseMoveEvent=null;
|
|
83057
|
+
|
|
83058
|
+
return true;
|
|
83059
|
+
}
|
|
83060
|
+
|
|
82796
83061
|
//内部函数
|
|
82797
83062
|
this.ChartOperator_Temp_GetHistoryData=function()
|
|
82798
83063
|
{
|
|
@@ -86976,7 +87241,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86976
87241
|
{
|
|
86977
87242
|
if (this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)
|
|
86978
87243
|
{
|
|
86979
|
-
if (this.
|
|
87244
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return;
|
|
87245
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
|
|
86980
87246
|
|
|
86981
87247
|
this.TouchStatus.CorssCursorShow=false;
|
|
86982
87248
|
this.DrawDynamicInfo();
|
|
@@ -86985,7 +87251,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86985
87251
|
|
|
86986
87252
|
if (this.EnableClickModel===true)
|
|
86987
87253
|
{
|
|
86988
|
-
if (this.ClickModel.IsShowCorssCursor==true && this.
|
|
87254
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
|
|
87255
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
|
|
86989
87256
|
|
|
86990
87257
|
this.ClickModel.IsShowCorssCursor=false;
|
|
86991
87258
|
this.DrawDynamicInfo();
|
|
@@ -91787,6 +92054,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91787
92054
|
this.TouchDrawCount=0;
|
|
91788
92055
|
this.PhonePinch=null;
|
|
91789
92056
|
this.TouchDrag=null;
|
|
92057
|
+
if (this.ClickModel) this.ClickModel.PreventHide=false;
|
|
91790
92058
|
this.StopDragTimer();
|
|
91791
92059
|
|
|
91792
92060
|
if (this.EnableScrollUpDown==false) e.preventDefault(); //上下拖动图形不能阻止事件
|
|
@@ -93255,6 +93523,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93255
93523
|
buySellBar.Name="Minute-BuySell-Bar";
|
|
93256
93524
|
buySellBar.Identify="Minute-BuySell-Bar";
|
|
93257
93525
|
buySellBar.BuySellData=this.BuySellData;
|
|
93526
|
+
buySellBar.HQChart=this;
|
|
93258
93527
|
this.ChartPaint[3]=buySellBar;
|
|
93259
93528
|
|
|
93260
93529
|
|
|
@@ -95855,6 +96124,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
95855
96124
|
{
|
|
95856
96125
|
if (this.EnableClickModel===true)
|
|
95857
96126
|
{
|
|
96127
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
|
|
95858
96128
|
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0) return;
|
|
95859
96129
|
|
|
95860
96130
|
this.ClickModel.IsShowCorssCursor=false;
|
|
@@ -158407,7 +158677,7 @@ function HQChartScriptWorker()
|
|
|
158407
158677
|
|
|
158408
158678
|
|
|
158409
158679
|
|
|
158410
|
-
var HQCHART_VERSION="1.1.
|
|
158680
|
+
var HQCHART_VERSION="1.1.14704";
|
|
158411
158681
|
|
|
158412
158682
|
function PrintHQChartVersion()
|
|
158413
158683
|
{
|