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.
|
@@ -4525,6 +4525,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4525
4525
|
}
|
|
4526
4526
|
}
|
|
4527
4527
|
|
|
4528
|
+
if (option.FastSlide)
|
|
4529
|
+
{
|
|
4530
|
+
var item=option.FastSlide;
|
|
4531
|
+
if (IFrameSplitOperator.IsNumber(item.MinDistance)) chart.FastSlideConfig.MinDistance=item.MinDistance;
|
|
4532
|
+
if (IFrameSplitOperator.IsNumber(item.MinSpeed)) chart.FastSlideConfig.MinSpeed=item.MinSpeed;
|
|
4533
|
+
if (IFrameSplitOperator.IsNumber(item.MaxTime)) chart.FastSlideConfig.MaxTime=item.MaxTime;
|
|
4534
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4528
4537
|
if (chart.ClassName=="KLineChartContainer")
|
|
4529
4538
|
{
|
|
4530
4539
|
if (!option.DragSelectRect)
|
|
@@ -4593,6 +4602,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4593
4602
|
if (IFrameSplitOperator.IsBool(item.RightButton.Enable)) chart.ChartCorssCursor.RightButton.Enable=item.RightButton.Enable;
|
|
4594
4603
|
}
|
|
4595
4604
|
|
|
4605
|
+
if (item.BottomButton)
|
|
4606
|
+
{
|
|
4607
|
+
var subItem=item.BottomButton;
|
|
4608
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) chart.ChartCorssCursor.BottomButton.Enable=subItem.Enable;
|
|
4609
|
+
}
|
|
4610
|
+
|
|
4596
4611
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
4597
4612
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
4598
4613
|
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
@@ -5077,6 +5092,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5077
5092
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
5078
5093
|
}
|
|
5079
5094
|
|
|
5095
|
+
if (option.FastSlide)
|
|
5096
|
+
{
|
|
5097
|
+
var item=option.FastSlide;
|
|
5098
|
+
if (IFrameSplitOperator.IsNumber(item.MinDistance)) chart.FastSlideConfig.MinDistance=item.MinDistance;
|
|
5099
|
+
if (IFrameSplitOperator.IsNumber(item.MinSpeed)) chart.FastSlideConfig.MinSpeed=item.MinSpeed;
|
|
5100
|
+
if (IFrameSplitOperator.IsNumber(item.MaxTime)) chart.FastSlideConfig.MaxTime=item.MaxTime;
|
|
5101
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5080
5104
|
//分页
|
|
5081
5105
|
if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
|
|
5082
5106
|
|
|
@@ -5098,6 +5122,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5098
5122
|
if (IFrameSplitOperator.IsBool(item.RightButton.Enable)) chart.ChartCorssCursor.RightButton.Enable=item.RightButton.Enable;
|
|
5099
5123
|
}
|
|
5100
5124
|
|
|
5125
|
+
if (item.BottomButton)
|
|
5126
|
+
{
|
|
5127
|
+
var subItem=item.BottomButton;
|
|
5128
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) chart.ChartCorssCursor.BottomButton.Enable=subItem.Enable;
|
|
5129
|
+
}
|
|
5130
|
+
|
|
5101
5131
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
5102
5132
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
5103
5133
|
|
|
@@ -6835,7 +6865,9 @@ var JSCHART_EVENT_ID=
|
|
|
6835
6865
|
|
|
6836
6866
|
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
6837
6867
|
|
|
6838
|
-
ON_TOUCH_FAST_SLIDE:169 //快速滑动
|
|
6868
|
+
ON_TOUCH_FAST_SLIDE:169, //快速滑动
|
|
6869
|
+
|
|
6870
|
+
ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
|
|
6839
6871
|
}
|
|
6840
6872
|
|
|
6841
6873
|
var JSCHART_OPERATOR_ID=
|
|
@@ -6864,6 +6896,8 @@ var JSCHART_OPERATOR_ID=
|
|
|
6864
6896
|
|
|
6865
6897
|
OP_GOTO:16, //移动到某一个天或某一个分钟
|
|
6866
6898
|
OP_GOTO_BY_DATAINDEX:17, //的移动到某一个数据起始位置
|
|
6899
|
+
|
|
6900
|
+
OP_MOVE_CORSSCURSOR:18, //移动十字光标 { Step, Start:{ Date:, Time: } }
|
|
6867
6901
|
}
|
|
6868
6902
|
|
|
6869
6903
|
var JSCHART_DRAG_ID=
|
|
@@ -7265,7 +7299,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7265
7299
|
this.EnableVerticalDrag=false;
|
|
7266
7300
|
|
|
7267
7301
|
//十字光标长留(手势才有)
|
|
7268
|
-
this.ClickModel={ IsShowCorssCursor:false };
|
|
7302
|
+
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false }; //PreventHide 阻止隐藏十字光标
|
|
7269
7303
|
this.EnableClickModel=false;
|
|
7270
7304
|
|
|
7271
7305
|
//标题栏显示最新数据
|
|
@@ -7296,7 +7330,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7296
7330
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7297
7331
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7298
7332
|
|
|
7299
|
-
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250 }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7333
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7300
7334
|
|
|
7301
7335
|
this.RestoreFocus=function(delay)
|
|
7302
7336
|
{
|
|
@@ -7890,11 +7924,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7890
7924
|
var button=this.ChartCorssCursor.PtInButton(x,y);
|
|
7891
7925
|
if (!button) return false;
|
|
7892
7926
|
|
|
7893
|
-
|
|
7894
|
-
if (event && event.Callback)
|
|
7927
|
+
if (button.Type==1)
|
|
7895
7928
|
{
|
|
7896
|
-
var
|
|
7897
|
-
event.Callback
|
|
7929
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_RIGHT);
|
|
7930
|
+
if (event && event.Callback)
|
|
7931
|
+
{
|
|
7932
|
+
var sendData={ Button:button, e };
|
|
7933
|
+
event.Callback(event,sendData,this);
|
|
7934
|
+
}
|
|
7935
|
+
}
|
|
7936
|
+
else if (button.Type==2)
|
|
7937
|
+
{
|
|
7938
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_BOTTOM);
|
|
7939
|
+
if (event && event.Callback)
|
|
7940
|
+
{
|
|
7941
|
+
var sendData={ Button:button, e };
|
|
7942
|
+
event.Callback(event,sendData,this);
|
|
7943
|
+
}
|
|
7898
7944
|
}
|
|
7899
7945
|
|
|
7900
7946
|
return true;
|
|
@@ -9404,6 +9450,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9404
9450
|
return true;
|
|
9405
9451
|
}
|
|
9406
9452
|
|
|
9453
|
+
if (this.TryClickCrossCursor(x,y))
|
|
9454
|
+
{
|
|
9455
|
+
return true;
|
|
9456
|
+
}
|
|
9457
|
+
|
|
9407
9458
|
return false;
|
|
9408
9459
|
}
|
|
9409
9460
|
|
|
@@ -9416,6 +9467,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9416
9467
|
this.TouchDrawCount=0;
|
|
9417
9468
|
this.PhonePinch=null;
|
|
9418
9469
|
this.TouchDrag=null;
|
|
9470
|
+
if (this.ClickModel) this.ClickModel.PreventHide=false;
|
|
9419
9471
|
this.StopDragTimer();
|
|
9420
9472
|
|
|
9421
9473
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9430,7 +9482,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9430
9482
|
var touches = this.GetToucheData(e, this.IsForceLandscape);
|
|
9431
9483
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
9432
9484
|
|
|
9433
|
-
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9485
|
+
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9486
|
+
return;
|
|
9434
9487
|
|
|
9435
9488
|
if (this.EnableVerticalDrag )
|
|
9436
9489
|
{
|
|
@@ -10802,6 +10855,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10802
10855
|
{
|
|
10803
10856
|
if (this.TouchStatus.CorssCursorShow==true) this.ChartCorssCursor.Draw();
|
|
10804
10857
|
}
|
|
10858
|
+
else if (this.EnableClickModel)
|
|
10859
|
+
{
|
|
10860
|
+
if (this.ClickModel.IsShowCorssCursor===true) this.ChartCorssCursor.Draw();
|
|
10861
|
+
}
|
|
10805
10862
|
else if (this.IsOnTouch===false && this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.IsShowCorssCursor===true) //开始绘图
|
|
10806
10863
|
{
|
|
10807
10864
|
this.ChartCorssCursor.Draw();
|
|
@@ -15667,11 +15724,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15667
15724
|
{
|
|
15668
15725
|
if (!this.TouchDrag) return false;
|
|
15669
15726
|
if (!this.FastSlideConfig) return false;
|
|
15727
|
+
var config=this.FastSlideConfig;
|
|
15728
|
+
if (!config.Enable) return false;
|
|
15670
15729
|
|
|
15671
15730
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);
|
|
15672
15731
|
if (!event || !event.Callback) return false;
|
|
15673
15732
|
|
|
15674
|
-
|
|
15733
|
+
|
|
15675
15734
|
var drag=this.TouchDrag;
|
|
15676
15735
|
var time=Date.now();
|
|
15677
15736
|
var spanTime=time-drag.StartTime;
|
|
@@ -44254,7 +44313,7 @@ function ChartMinuteBuySellBar()
|
|
|
44254
44313
|
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44255
44314
|
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44256
44315
|
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44257
|
-
this.
|
|
44316
|
+
this.AryBarRange=g_JSChartResource.Minute.BuySellBar.AryBarRange;
|
|
44258
44317
|
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44259
44318
|
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44260
44319
|
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
@@ -44269,7 +44328,7 @@ function ChartMinuteBuySellBar()
|
|
|
44269
44328
|
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44270
44329
|
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44271
44330
|
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44272
|
-
this.
|
|
44331
|
+
this.AryBarRange=g_JSChartResource.Minute.BuySellBar.AryBarRange;
|
|
44273
44332
|
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44274
44333
|
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44275
44334
|
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
@@ -44285,11 +44344,29 @@ function ChartMinuteBuySellBar()
|
|
|
44285
44344
|
var volRange=this.GetVolRange();
|
|
44286
44345
|
if (!volRange) return;
|
|
44287
44346
|
|
|
44347
|
+
var minData=this.HQChart.GetKData();
|
|
44348
|
+
if (!minData || !IFrameSplitOperator.IsNonEmptyArray(minData.Data)) return;
|
|
44349
|
+
|
|
44288
44350
|
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
44289
44351
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
44352
|
+
var minuteCount=this.ChartFrame.MinuteCount;
|
|
44353
|
+
var minIndex=(minData.Data.length-1)%minuteCount;
|
|
44290
44354
|
|
|
44291
|
-
var
|
|
44292
|
-
var
|
|
44355
|
+
var startIndex=xPointCount-1-120;
|
|
44356
|
+
var endIndex=xPointCount-1;
|
|
44357
|
+
for(var i=0;i<this.AryBarRange.length;++i)
|
|
44358
|
+
{
|
|
44359
|
+
var item=this.AryBarRange[i];
|
|
44360
|
+
if (minIndex<(minuteCount-1-item.End))
|
|
44361
|
+
{
|
|
44362
|
+
startIndex=xPointCount-1-item.Start;
|
|
44363
|
+
endIndex=xPointCount-1-item.End;
|
|
44364
|
+
break;
|
|
44365
|
+
}
|
|
44366
|
+
}
|
|
44367
|
+
|
|
44368
|
+
var xStart=this.ChartFrame.GetXFromIndex(startIndex);
|
|
44369
|
+
var xEnd=this.ChartFrame.GetXFromIndex(endIndex);
|
|
44293
44370
|
|
|
44294
44371
|
function _Temp_GetXFromData(value)
|
|
44295
44372
|
{
|
|
@@ -59885,6 +59962,12 @@ function ChartCorssCursor()
|
|
|
59885
59962
|
Icon:g_JSChartResource.CorssCursor.RightButton.Icon
|
|
59886
59963
|
};
|
|
59887
59964
|
|
|
59965
|
+
//底部按钮
|
|
59966
|
+
this.BottomButton=
|
|
59967
|
+
{
|
|
59968
|
+
Enable:false, Rect:null,
|
|
59969
|
+
}
|
|
59970
|
+
|
|
59888
59971
|
this.RightMargin=CloneData(g_JSChartResource.CorssCursor.RightMargin);
|
|
59889
59972
|
this.BottomConfig=CloneData(g_JSChartResource.CorssCursor.BottomText); //底部输出配置
|
|
59890
59973
|
this.LeftConfig=CloneData(g_JSChartResource.CorssCursor.LeftText);
|
|
@@ -60088,6 +60171,7 @@ function ChartCorssCursor()
|
|
|
60088
60171
|
{
|
|
60089
60172
|
this.Status=0;
|
|
60090
60173
|
this.RightButton.Rect=null;
|
|
60174
|
+
this.BottomButton.Rect=null;
|
|
60091
60175
|
this.LastValue=null;
|
|
60092
60176
|
|
|
60093
60177
|
if (!this.LastPoint) return;
|
|
@@ -60493,6 +60577,11 @@ function ChartCorssCursor()
|
|
|
60493
60577
|
this.Canvas.textBaseline="bottom";
|
|
60494
60578
|
this.Canvas.fillStyle=this.TextColor;
|
|
60495
60579
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
|
|
60580
|
+
|
|
60581
|
+
var buttonData={X:x, Y:y, XValue:xValue, FrameID:yValueExtend.FrameID };
|
|
60582
|
+
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
60583
|
+
this.BottomButton.Rect=rtBG;
|
|
60584
|
+
this.BottomButton.Data=buttonData;
|
|
60496
60585
|
}
|
|
60497
60586
|
}
|
|
60498
60587
|
|
|
@@ -60712,17 +60801,42 @@ function ChartCorssCursor()
|
|
|
60712
60801
|
}
|
|
60713
60802
|
|
|
60714
60803
|
this.PtInButton=function(x,y)
|
|
60804
|
+
{
|
|
60805
|
+
var item=this.PtInRightButton(x,y);
|
|
60806
|
+
if (item) return item;
|
|
60807
|
+
|
|
60808
|
+
item=this.PtInButtomButton(x,y);
|
|
60809
|
+
if (item) return item;
|
|
60810
|
+
|
|
60811
|
+
return null;
|
|
60812
|
+
}
|
|
60813
|
+
|
|
60814
|
+
this.PtInRightButton=function(x,y)
|
|
60715
60815
|
{
|
|
60716
60816
|
if (!this.RightButton.Enable) return null;
|
|
60717
60817
|
if (!this.RightButton.Rect) return null;
|
|
60718
60818
|
|
|
60719
60819
|
var rect=this.RightButton.Rect;
|
|
60720
|
-
|
|
60721
|
-
this.Canvas.rect(rect.Left,rect.Top,rect.Width,rect.Height);
|
|
60722
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
60820
|
+
if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom)
|
|
60723
60821
|
{
|
|
60724
|
-
return { Data:this.RightButton.Data, Rect:rect };
|
|
60822
|
+
return { Data:this.RightButton.Data, Rect:rect, Type:1 }; //Type:1=右侧 2=底部
|
|
60725
60823
|
}
|
|
60824
|
+
|
|
60825
|
+
return null;
|
|
60826
|
+
}
|
|
60827
|
+
|
|
60828
|
+
this.PtInButtomButton=function(x,y)
|
|
60829
|
+
{
|
|
60830
|
+
if (!this.BottomButton.Enable) return null;
|
|
60831
|
+
if (!this.BottomButton.Rect) return null;
|
|
60832
|
+
|
|
60833
|
+
var rect=this.BottomButton.Rect;
|
|
60834
|
+
if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom)
|
|
60835
|
+
{
|
|
60836
|
+
return { Data:this.BottomButton.Data, Rect:rect , Type:2 }; //Type:1=右侧 2=底部
|
|
60837
|
+
}
|
|
60838
|
+
|
|
60839
|
+
return null;
|
|
60726
60840
|
}
|
|
60727
60841
|
|
|
60728
60842
|
this.DrawTextBGRect=function(x,y, height, width)
|
|
@@ -61770,9 +61884,11 @@ function HQDateStringFormat()
|
|
|
61770
61884
|
|
|
61771
61885
|
this.DateFormatType=0; //0=YYYY-MM-DD 1=YYYY/MM/DD 2=YYYY/MM/DD/W 3=DD/MM/YYYY
|
|
61772
61886
|
this.LanguageID=0;
|
|
61887
|
+
this.KItem=null; //缓存当前的K线
|
|
61773
61888
|
|
|
61774
61889
|
this.Operator=function()
|
|
61775
61890
|
{
|
|
61891
|
+
this.KItem=null;
|
|
61776
61892
|
if (!IFrameSplitOperator.IsNumber(this.Value)) return false;
|
|
61777
61893
|
if (!this.Data) return false;
|
|
61778
61894
|
|
|
@@ -61780,6 +61896,7 @@ function HQDateStringFormat()
|
|
|
61780
61896
|
index=parseInt(index.toFixed(0));
|
|
61781
61897
|
if (this.Data.DataOffset+index>=this.Data.Data.length) return false;
|
|
61782
61898
|
var currentData = this.Data.Data[this.Data.DataOffset+index];
|
|
61899
|
+
this.KItem=currentData;
|
|
61783
61900
|
var dateFormatString="YYYY-MM-DD";
|
|
61784
61901
|
if (this.DateFormatType==1) dateFormatString="YYYY/MM/DD";
|
|
61785
61902
|
else if (this.DateFormatType==2) dateFormatString="YYYY/MM/DD/W";
|
|
@@ -77959,6 +78076,8 @@ function JSChartResource()
|
|
|
77959
78076
|
YOffset:1,
|
|
77960
78077
|
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
77961
78078
|
TextColor:"rgb(128,128,128)",
|
|
78079
|
+
|
|
78080
|
+
AryBarRange:[{ Start:240, End:120 }, { Start:120, End:0}],
|
|
77962
78081
|
}
|
|
77963
78082
|
|
|
77964
78083
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
@@ -79509,7 +79628,7 @@ function JSChartResource()
|
|
|
79509
79628
|
if (item.Font) dest.Font=item.Font;
|
|
79510
79629
|
if (item.TextColor) dest.TextColor=item.TextColor;
|
|
79511
79630
|
if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
|
|
79512
|
-
if (IFrameSplitOperator.
|
|
79631
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryBarRange)) dest.AryBarRange=item.AryBarRange;
|
|
79513
79632
|
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
|
|
79514
79633
|
}
|
|
79515
79634
|
}
|
|
@@ -82722,33 +82841,179 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82722
82841
|
return;
|
|
82723
82842
|
}
|
|
82724
82843
|
|
|
82844
|
+
return this.ChartOperator_Temp_SetChartCorssCursor(findIndex, item);
|
|
82845
|
+
}
|
|
82846
|
+
else if (id==JSCHART_OPERATOR_ID.OP_MOVE_CORSSCURSOR) //移动十字光标 { Step, Start:{ Date, Time }}
|
|
82847
|
+
{
|
|
82848
|
+
if (!IFrameSplitOperator.IsNumber(obj.Step)) return false;
|
|
82849
|
+
if (obj.Step==0) return false;
|
|
82850
|
+
var step=obj.Step;
|
|
82851
|
+
|
|
82725
82852
|
if (!this.Frame || !this.Frame.SubFrame[0] || !this.Frame.SubFrame[0].Frame) return false;
|
|
82726
|
-
var
|
|
82853
|
+
var showCount=this.Frame.SubFrame[0].Frame.XPointCount; //一屏显示个数
|
|
82727
82854
|
|
|
82728
|
-
var
|
|
82729
|
-
|
|
82855
|
+
var kData=this.GetKData();
|
|
82856
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false; //数据还没有到达
|
|
82730
82857
|
|
|
82731
|
-
|
|
82732
|
-
var
|
|
82733
|
-
|
|
82734
|
-
|
|
82858
|
+
var start=kData.DataOffset;
|
|
82859
|
+
var bDayPeriod=ChartData.IsDayPeriod(this.Period,true);
|
|
82860
|
+
var findItem=null, dataIndex=-1;
|
|
82861
|
+
for(var i=0; i<kData.Data.length; ++i)
|
|
82862
|
+
{
|
|
82863
|
+
var item=kData.Data[i];
|
|
82864
|
+
if (!item) continue;
|
|
82735
82865
|
|
|
82736
|
-
|
|
82737
|
-
|
|
82738
|
-
|
|
82866
|
+
if (bDayPeriod)
|
|
82867
|
+
{
|
|
82868
|
+
if (item.Date==obj.Start.Date)
|
|
82869
|
+
{
|
|
82870
|
+
findItem=item;
|
|
82871
|
+
dataIndex=i;
|
|
82872
|
+
break;
|
|
82873
|
+
}
|
|
82874
|
+
}
|
|
82875
|
+
else
|
|
82876
|
+
{
|
|
82877
|
+
if (item.Date==obj.Start.Date && item.Time==obj.Start.Time)
|
|
82878
|
+
{
|
|
82879
|
+
findItem=item;
|
|
82880
|
+
dataIndex=i;
|
|
82881
|
+
break;
|
|
82882
|
+
}
|
|
82883
|
+
}
|
|
82884
|
+
}
|
|
82739
82885
|
|
|
82740
|
-
|
|
82886
|
+
if (!findItem) return false;
|
|
82741
82887
|
|
|
82742
|
-
var
|
|
82743
|
-
|
|
82744
|
-
|
|
82745
|
-
|
|
82746
|
-
|
|
82747
|
-
|
|
82748
|
-
|
|
82888
|
+
var index=-1;
|
|
82889
|
+
var dataOffset=kData.DataOffset;
|
|
82890
|
+
if (dataIndex>=start && dataIndex<=start+(showCount-1))
|
|
82891
|
+
{
|
|
82892
|
+
index=dataIndex-start;
|
|
82893
|
+
}
|
|
82894
|
+
else //需要调整当前屏范围
|
|
82895
|
+
{
|
|
82896
|
+
if (step>0)
|
|
82897
|
+
{
|
|
82898
|
+
if (dataIndex+showCount>=kData.Data.length)
|
|
82899
|
+
{
|
|
82900
|
+
dataOffset=kData.Data.length-showCount;
|
|
82901
|
+
index=dataIndex-dataOffset;
|
|
82902
|
+
}
|
|
82903
|
+
else
|
|
82904
|
+
{
|
|
82905
|
+
index=0;
|
|
82906
|
+
dataOffset=dataIndex;
|
|
82907
|
+
}
|
|
82908
|
+
}
|
|
82909
|
+
else
|
|
82910
|
+
{
|
|
82911
|
+
if (dataIndex-showCount<0)
|
|
82912
|
+
{
|
|
82913
|
+
dataOffset=0;
|
|
82914
|
+
index=dataIndex;
|
|
82915
|
+
}
|
|
82916
|
+
else if (dataIndex+showCount>=kData.Data.length)
|
|
82917
|
+
{
|
|
82918
|
+
dataOffset=kData.Data.length-showCount;
|
|
82919
|
+
index=dataIndex-dataOffset;
|
|
82920
|
+
}
|
|
82921
|
+
else
|
|
82922
|
+
{
|
|
82923
|
+
index=showCount;
|
|
82924
|
+
dataOffset=dataIndex-showCount;
|
|
82925
|
+
}
|
|
82926
|
+
}
|
|
82927
|
+
}
|
|
82928
|
+
|
|
82929
|
+
var kItem=findItem;
|
|
82930
|
+
if (step>0)
|
|
82931
|
+
{
|
|
82932
|
+
for(var i=dataIndex+1, j=0; i<kData.Data.length && j<step; ++i, ++j)
|
|
82933
|
+
{
|
|
82934
|
+
++index;
|
|
82935
|
+
dataIndex=i;
|
|
82936
|
+
if (index>=(showCount-1))
|
|
82937
|
+
{
|
|
82938
|
+
index=showCount-1;
|
|
82939
|
+
dataOffset+=1;
|
|
82940
|
+
}
|
|
82941
|
+
|
|
82942
|
+
var item=kData.Data[i];
|
|
82943
|
+
if (!item) continue;
|
|
82944
|
+
|
|
82945
|
+
var kItem=item;
|
|
82946
|
+
}
|
|
82947
|
+
}
|
|
82948
|
+
else if (step<0)
|
|
82949
|
+
{
|
|
82950
|
+
for(var i=dataIndex-1, j=0;i>=0 && j<Math.abs(step);--i, ++j)
|
|
82951
|
+
{
|
|
82952
|
+
--index
|
|
82953
|
+
dataIndex=i;
|
|
82954
|
+
if (index<=0)
|
|
82955
|
+
{
|
|
82956
|
+
index=0;
|
|
82957
|
+
dataOffset-=1;
|
|
82958
|
+
}
|
|
82959
|
+
|
|
82960
|
+
var item=kData.Data[i];
|
|
82961
|
+
if (!item) continue;
|
|
82962
|
+
var kItem=item;
|
|
82963
|
+
}
|
|
82964
|
+
}
|
|
82965
|
+
|
|
82966
|
+
if (!kItem) return false;
|
|
82967
|
+
|
|
82968
|
+
obj.KItem=kItem;
|
|
82969
|
+
if (kData.DataOffset==dataOffset)
|
|
82970
|
+
{
|
|
82971
|
+
return this.ChartOperator_Temp_SetChartCorssCursor(index, kItem);
|
|
82972
|
+
}
|
|
82973
|
+
else
|
|
82974
|
+
{
|
|
82975
|
+
kData.DataOffset=dataOffset
|
|
82976
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
82977
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
82978
|
+
this.ResetFrameXSplit();
|
|
82979
|
+
this.Frame.SetSizeChage(true);
|
|
82980
|
+
this.Draw();
|
|
82981
|
+
this.ChartOperator_Temp_SetChartCorssCursor(index, kItem);
|
|
82982
|
+
return true;
|
|
82983
|
+
}
|
|
82749
82984
|
}
|
|
82750
82985
|
}
|
|
82751
82986
|
|
|
82987
|
+
|
|
82988
|
+
this.ChartOperator_Temp_SetChartCorssCursor=function(index, kItem)
|
|
82989
|
+
{
|
|
82990
|
+
if (!this.Frame || !this.Frame.SubFrame[0] || !this.Frame.SubFrame[0].Frame) return false;
|
|
82991
|
+
var frame=this.Frame.SubFrame[0].Frame;
|
|
82992
|
+
|
|
82993
|
+
var x=frame.GetXFromIndex(index);
|
|
82994
|
+
var y=frame.GetYFromData(kItem.Close);
|
|
82995
|
+
|
|
82996
|
+
//保存最后一次鼠标移动信息
|
|
82997
|
+
var MoveStatus={ X:x, Y:y, IsInClient: this.IsMouseOnClient(x,y) };
|
|
82998
|
+
this.LastMouseStatus.OnMouseMove=MoveStatus;
|
|
82999
|
+
this.LastMouseStatus.MoveOnPoint={X:x, Y:y}; //鼠标移动的位置
|
|
83000
|
+
|
|
83001
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);
|
|
83002
|
+
var titleChart=this.TitlePaint[0];
|
|
83003
|
+
if (event && titleChart) titleChart.OnMouseMoveEvent=event;
|
|
83004
|
+
|
|
83005
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
83006
|
+
var e={ };
|
|
83007
|
+
e.clientX=(x/pixelTatio)+this.UIElement.getBoundingClientRect().left;
|
|
83008
|
+
e.clientY=(y/pixelTatio)+this.UIElement.getBoundingClientRect().top;
|
|
83009
|
+
this.MoveOnPoint={X:x, Y:y};
|
|
83010
|
+
this.OnMouseMove(x,y,e);
|
|
83011
|
+
this.LastMouseStatus.MoveOnPoint=null;
|
|
83012
|
+
if (titleChart) titleChart.OnMouseMoveEvent=null;
|
|
83013
|
+
|
|
83014
|
+
return true;
|
|
83015
|
+
}
|
|
83016
|
+
|
|
82752
83017
|
//内部函数
|
|
82753
83018
|
this.ChartOperator_Temp_GetHistoryData=function()
|
|
82754
83019
|
{
|
|
@@ -86932,7 +87197,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86932
87197
|
{
|
|
86933
87198
|
if (this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)
|
|
86934
87199
|
{
|
|
86935
|
-
if (this.
|
|
87200
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return;
|
|
87201
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
|
|
86936
87202
|
|
|
86937
87203
|
this.TouchStatus.CorssCursorShow=false;
|
|
86938
87204
|
this.DrawDynamicInfo();
|
|
@@ -86941,7 +87207,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86941
87207
|
|
|
86942
87208
|
if (this.EnableClickModel===true)
|
|
86943
87209
|
{
|
|
86944
|
-
if (this.ClickModel.IsShowCorssCursor==true && this.
|
|
87210
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
|
|
87211
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
|
|
86945
87212
|
|
|
86946
87213
|
this.ClickModel.IsShowCorssCursor=false;
|
|
86947
87214
|
this.DrawDynamicInfo();
|
|
@@ -91743,6 +92010,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91743
92010
|
this.TouchDrawCount=0;
|
|
91744
92011
|
this.PhonePinch=null;
|
|
91745
92012
|
this.TouchDrag=null;
|
|
92013
|
+
if (this.ClickModel) this.ClickModel.PreventHide=false;
|
|
91746
92014
|
this.StopDragTimer();
|
|
91747
92015
|
|
|
91748
92016
|
if (this.EnableScrollUpDown==false) e.preventDefault(); //上下拖动图形不能阻止事件
|
|
@@ -93211,6 +93479,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93211
93479
|
buySellBar.Name="Minute-BuySell-Bar";
|
|
93212
93480
|
buySellBar.Identify="Minute-BuySell-Bar";
|
|
93213
93481
|
buySellBar.BuySellData=this.BuySellData;
|
|
93482
|
+
buySellBar.HQChart=this;
|
|
93214
93483
|
this.ChartPaint[3]=buySellBar;
|
|
93215
93484
|
|
|
93216
93485
|
|
|
@@ -95811,6 +96080,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
95811
96080
|
{
|
|
95812
96081
|
if (this.EnableClickModel===true)
|
|
95813
96082
|
{
|
|
96083
|
+
if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
|
|
95814
96084
|
if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0) return;
|
|
95815
96085
|
|
|
95816
96086
|
this.ClickModel.IsShowCorssCursor=false;
|
|
@@ -147592,7 +147862,7 @@ function ScrollBarBGChart()
|
|
|
147592
147862
|
|
|
147593
147863
|
|
|
147594
147864
|
|
|
147595
|
-
var HQCHART_VERSION="1.1.
|
|
147865
|
+
var HQCHART_VERSION="1.1.14704";
|
|
147596
147866
|
|
|
147597
147867
|
function PrintHQChartVersion()
|
|
147598
147868
|
{
|