hqchart 1.1.15089 → 1.1.15104
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.
|
@@ -6992,6 +6992,8 @@ var JSCHART_EVENT_ID=
|
|
|
6992
6992
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
6993
6993
|
|
|
6994
6994
|
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
6995
|
+
ON_CLICK_INDEX_LOCK:178, //点击指标锁
|
|
6996
|
+
ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
|
|
6995
6997
|
}
|
|
6996
6998
|
|
|
6997
6999
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7229,6 +7231,18 @@ var JSCHART_TRADE_STATUS_ID=
|
|
|
7229
7231
|
SUSP_ID:1, //停牌
|
|
7230
7232
|
}
|
|
7231
7233
|
|
|
7234
|
+
//十字光标状态
|
|
7235
|
+
var JSCHART_CORSSCURSOR_STATUS_ID=
|
|
7236
|
+
{
|
|
7237
|
+
NONE_ID:0,
|
|
7238
|
+
LINE_ID:1,
|
|
7239
|
+
LEFT_TEXT_ID:2,
|
|
7240
|
+
LEFT_INTER_TEXT_ID:4,
|
|
7241
|
+
RIGHT_TEXT_ID:8,
|
|
7242
|
+
RIGHT_INTER_TEXT_ID:16,
|
|
7243
|
+
BOTTOM_TEXT_ID:32,
|
|
7244
|
+
}
|
|
7245
|
+
|
|
7232
7246
|
|
|
7233
7247
|
function PhoneDBClick()
|
|
7234
7248
|
{
|
|
@@ -7445,6 +7459,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7445
7459
|
//锁十字光标
|
|
7446
7460
|
LockCorssCursor:{ X:{ Enable:false } },
|
|
7447
7461
|
|
|
7462
|
+
CorssCursorStatus:{ Value:null }, //十字光标状态 只读
|
|
7463
|
+
|
|
7448
7464
|
//图形中的单元选中状态
|
|
7449
7465
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
7450
7466
|
|
|
@@ -7611,6 +7627,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7611
7627
|
this.BuySellData.ArySell=null;
|
|
7612
7628
|
}
|
|
7613
7629
|
|
|
7630
|
+
this.UpdateCorssCursorStatus=function()
|
|
7631
|
+
{
|
|
7632
|
+
if (!this.ChartCorssCursor) return false;
|
|
7633
|
+
if (!this.GlobalOption || !this.GlobalOption.CorssCursorStatus) return false;
|
|
7634
|
+
|
|
7635
|
+
var status=this.ChartCorssCursor.Status;
|
|
7636
|
+
|
|
7637
|
+
//状态改变了
|
|
7638
|
+
if (this.GlobalOption.CorssCursorStatus.Value!=status)
|
|
7639
|
+
{
|
|
7640
|
+
this.GlobalOption.CorssCursorStatus.Value=status;
|
|
7641
|
+
|
|
7642
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CORSSCURSOR_STATUS_CHANGE);
|
|
7643
|
+
if (event && event.Callback)
|
|
7644
|
+
{
|
|
7645
|
+
var sendData={ Status:status, IsShowLine:(status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0 };
|
|
7646
|
+
event.Callback(event, sendData, this);
|
|
7647
|
+
}
|
|
7648
|
+
}
|
|
7649
|
+
|
|
7650
|
+
return true;
|
|
7651
|
+
}
|
|
7652
|
+
|
|
7614
7653
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
7615
7654
|
{
|
|
7616
7655
|
if (this.JSPopMenu) return;
|
|
@@ -10578,6 +10617,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10578
10617
|
this.Frame.ClearCoordinateText();
|
|
10579
10618
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
10580
10619
|
this.ChartSplashPaint.Draw();
|
|
10620
|
+
this.UpdateCorssCursorStatus();
|
|
10581
10621
|
return;
|
|
10582
10622
|
}
|
|
10583
10623
|
|
|
@@ -10870,6 +10910,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10870
10910
|
}
|
|
10871
10911
|
|
|
10872
10912
|
++this.TouchDrawCount;
|
|
10913
|
+
|
|
10914
|
+
this.UpdateCorssCursorStatus();
|
|
10873
10915
|
}
|
|
10874
10916
|
|
|
10875
10917
|
this.DrawExtendChartPaint=function(level, option)
|
|
@@ -11349,39 +11391,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11349
11391
|
exChartOption.Tooltip=option.Tooltip;
|
|
11350
11392
|
exChartOption.Point=option.Point;
|
|
11351
11393
|
}
|
|
11352
|
-
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11353
|
-
/*
|
|
11354
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形 在动态标题以后画
|
|
11355
|
-
{
|
|
11356
|
-
var item=this.ExtendChartPaint[i];
|
|
11357
|
-
if (item.IsCallbackDraw) continue;
|
|
11358
|
-
if (item.DrawAfterPicture) continue;
|
|
11359
|
-
if (item.ClassName=='KLineTooltipPaint' && option)
|
|
11360
|
-
{
|
|
11361
|
-
if (option.Tooltip==false) continue;
|
|
11362
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
11363
|
-
}
|
|
11364
|
-
else if (item.ClassName=="MinuteTooltipPaint" && option)
|
|
11365
|
-
{
|
|
11366
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
11367
|
-
}
|
|
11368
|
-
|
|
11369
|
-
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
11370
|
-
}
|
|
11371
|
-
*/
|
|
11372
11394
|
|
|
11395
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11396
|
+
|
|
11373
11397
|
if (this.EnableAnimation) this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_30);
|
|
11374
|
-
|
|
11375
|
-
if (this.EnableAnimation)
|
|
11376
|
-
{
|
|
11377
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动画
|
|
11378
|
-
{
|
|
11379
|
-
var item=this.ExtendChartPaint[i];
|
|
11380
|
-
if (item.IsAnimation===true) item.Draw();
|
|
11381
|
-
}
|
|
11382
|
-
}
|
|
11383
|
-
*/
|
|
11384
|
-
|
|
11398
|
+
|
|
11385
11399
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
11386
11400
|
{
|
|
11387
11401
|
var item=this.ChartDrawPicture[i];
|
|
@@ -11407,15 +11421,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11407
11421
|
}
|
|
11408
11422
|
|
|
11409
11423
|
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50);
|
|
11410
|
-
|
|
11411
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
11412
|
-
{
|
|
11413
|
-
var item=this.ExtendChartPaint[i];
|
|
11414
|
-
if (item.DrawAfterPicture)
|
|
11415
|
-
item.Draw();
|
|
11416
|
-
}
|
|
11417
|
-
*/
|
|
11418
|
-
|
|
11424
|
+
|
|
11419
11425
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
11420
11426
|
{
|
|
11421
11427
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
@@ -11427,6 +11433,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11427
11433
|
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
11428
11434
|
|
|
11429
11435
|
++this.TouchDrawCount;
|
|
11436
|
+
|
|
11437
|
+
this.UpdateCorssCursorStatus();
|
|
11430
11438
|
}
|
|
11431
11439
|
|
|
11432
11440
|
this.DrawAnimation=function() //绘制动画 如弹幕
|
|
@@ -51882,7 +51890,6 @@ function ChartLock()
|
|
|
51882
51890
|
delete this.newMethod;
|
|
51883
51891
|
|
|
51884
51892
|
this.ClassName="ChartLock";
|
|
51885
|
-
this.WidthDiv = 0.2; // 框子宽度占比
|
|
51886
51893
|
this.LockCount = 20; // 锁最新的几个数据
|
|
51887
51894
|
this.BGColor = g_JSChartResource.IndexLock.BGColor;
|
|
51888
51895
|
this.TextColor = g_JSChartResource.IndexLock.TextColor;
|
|
@@ -51893,7 +51900,6 @@ function ChartLock()
|
|
|
51893
51900
|
this.Callback; //回调
|
|
51894
51901
|
this.IndexName; //指标名字
|
|
51895
51902
|
this.IndexID; //指标ID
|
|
51896
|
-
this.MinWidth=null; //最小宽度
|
|
51897
51903
|
|
|
51898
51904
|
|
|
51899
51905
|
this.CalculateTextSize=function(aryText, defaultFont, out)
|
|
@@ -51909,9 +51915,25 @@ function ChartLock()
|
|
|
51909
51915
|
var item=aryText[i];
|
|
51910
51916
|
if (!item || !item.Text) continue;
|
|
51911
51917
|
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
51912
|
-
|
|
51913
|
-
|
|
51914
|
-
|
|
51918
|
+
|
|
51919
|
+
var lineItem={ Text:item.Text, Width:textWidth, Height:lineHeight, Color:item.Color, TextMargin:{ Top:0, Bottom:0, Left:0, Right:0 }, YOffset:0 };
|
|
51920
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) lineItem.YOffset=item.YOffset;
|
|
51921
|
+
if (item.TextMargin)
|
|
51922
|
+
{
|
|
51923
|
+
var margin=item.TextMargin;
|
|
51924
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) lineItem.TextMargin.Top=margin.Top;
|
|
51925
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) lineItem.TextMargin.Bottom=margin.Bottom;
|
|
51926
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) lineItem.TextMargin.Left=margin.Left;
|
|
51927
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) lineItem.TextMargin.Right=margin.Right;
|
|
51928
|
+
}
|
|
51929
|
+
|
|
51930
|
+
lineItem.Height+=lineItem.TextMargin.Top+lineItem.TextMargin.Bottom;
|
|
51931
|
+
lineItem.Width+=lineItem.TextMargin.Left+lineItem.TextMargin.Right;
|
|
51932
|
+
|
|
51933
|
+
if (width<lineItem.Width) width=lineItem.Width;
|
|
51934
|
+
|
|
51935
|
+
out.AryText.push(lineItem);
|
|
51936
|
+
height+=lineItem.Height;
|
|
51915
51937
|
}
|
|
51916
51938
|
|
|
51917
51939
|
out.Width=width;
|
|
@@ -51920,70 +51942,78 @@ function ChartLock()
|
|
|
51920
51942
|
return true;
|
|
51921
51943
|
}
|
|
51922
51944
|
|
|
51923
|
-
this.Draw=function(
|
|
51945
|
+
this.Draw=function(bDraw)
|
|
51924
51946
|
{
|
|
51925
51947
|
this.LockRect=null;
|
|
51948
|
+
if (!bDraw) return;
|
|
51926
51949
|
if (this.NotSupportMessage)
|
|
51927
51950
|
{
|
|
51928
51951
|
this.DrawNotSupportmessage();
|
|
51929
51952
|
return;
|
|
51930
51953
|
}
|
|
51931
51954
|
|
|
51932
|
-
|
|
51955
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
51956
|
+
var bMinute=this.IsMinuteFrame();
|
|
51957
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
51958
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
51959
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
51960
|
+
var border=this.ChartFrame.GetBorder();
|
|
51961
|
+
if (bHScreen)
|
|
51933
51962
|
{
|
|
51934
|
-
|
|
51935
|
-
|
|
51963
|
+
var chartright=border.BottomEx;
|
|
51964
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
51965
|
+
}
|
|
51966
|
+
else
|
|
51967
|
+
{
|
|
51968
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
51969
|
+
var chartright=border.RightEx;
|
|
51936
51970
|
}
|
|
51937
51971
|
|
|
51938
|
-
var
|
|
51939
|
-
var
|
|
51940
|
-
|
|
51941
|
-
if (this.ChartFrame.Data != null)
|
|
51972
|
+
var kData=this.ChartFrame.Data;
|
|
51973
|
+
var left=xOffset;
|
|
51974
|
+
if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
|
|
51942
51975
|
{
|
|
51943
|
-
var
|
|
51944
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
51945
|
-
xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+2.0;
|
|
51946
|
-
var chartright=this.ChartBorder.GetRight();
|
|
51947
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
51948
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
51976
|
+
for(var i=kData.DataOffset,j=0;i<kData.Data.length-this.LockCount && j<xPointCount-this.LockCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
51949
51977
|
{
|
|
51950
|
-
var
|
|
51951
|
-
if (
|
|
51978
|
+
var kItem=kData.Data[i];
|
|
51979
|
+
if (kItem.Open==null || kItem.High==null || kItem.Low==null || kItem.Close==null) continue;
|
|
51952
51980
|
|
|
51953
|
-
|
|
51954
|
-
|
|
51955
|
-
|
|
51981
|
+
if (bMinute)
|
|
51982
|
+
{
|
|
51983
|
+
left=this.ChartFrame.GetXFromIndex(j);
|
|
51984
|
+
}
|
|
51985
|
+
else
|
|
51986
|
+
{
|
|
51987
|
+
left=xOffset;
|
|
51988
|
+
var right=xOffset+dataWidth;
|
|
51989
|
+
if (right>chartright) break;
|
|
51990
|
+
}
|
|
51956
51991
|
}
|
|
51957
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
51958
51992
|
}
|
|
51959
|
-
|
|
51993
|
+
|
|
51994
|
+
if (bHScreen)
|
|
51960
51995
|
{
|
|
51961
|
-
|
|
51962
|
-
|
|
51963
|
-
|
|
51964
|
-
if (lLeft < this.ChartBorder.GetLeft())
|
|
51965
|
-
lLeft = this.ChartBorder.GetLeft();
|
|
51966
|
-
var lWidth = this.ChartBorder.GetRight() - lLeft;
|
|
51996
|
+
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
51997
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
51998
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
51967
51999
|
|
|
51968
|
-
|
|
52000
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
52001
|
+
this.Canvas.fillStyle =bgColor;
|
|
52002
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52003
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52004
|
+
}
|
|
52005
|
+
else
|
|
51969
52006
|
{
|
|
51970
|
-
|
|
51971
|
-
|
|
51972
|
-
|
|
52007
|
+
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
52008
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52009
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52010
|
+
//上下渐变
|
|
52011
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52012
|
+
this.Canvas.fillStyle =bgColor;
|
|
52013
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52014
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
51973
52015
|
}
|
|
51974
52016
|
|
|
51975
|
-
var rtBG={ Left:lLeft, Top:border.TopTitle, Bottom:border.Bottom, Width:lWidth };
|
|
51976
|
-
rtBG.Right=rtBG.Width+rtBG.Left;
|
|
51977
|
-
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
51978
|
-
this.LockRect=rtBG; //保存上锁区域
|
|
51979
|
-
|
|
51980
|
-
if (!isDraw) return;
|
|
51981
|
-
|
|
51982
|
-
//上下渐变
|
|
51983
|
-
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
51984
|
-
this.Canvas.fillStyle =bgColor;
|
|
51985
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
51986
|
-
|
|
51987
52017
|
var aryText=null;
|
|
51988
52018
|
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
51989
52019
|
else aryText=[{Text:this.Title}];
|
|
@@ -51991,85 +52021,57 @@ function ChartLock()
|
|
|
51991
52021
|
var outSize={ };
|
|
51992
52022
|
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
51993
52023
|
|
|
51994
|
-
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
51995
|
-
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
51996
|
-
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
51997
|
-
|
|
51998
52024
|
this.Canvas.textAlign='left';
|
|
51999
52025
|
this.Canvas.textBaseline='bottom';
|
|
52000
52026
|
this.Canvas.font = this.Font;
|
|
52001
|
-
|
|
52002
|
-
|
|
52027
|
+
|
|
52028
|
+
if (bHScreen)
|
|
52003
52029
|
{
|
|
52004
|
-
var
|
|
52005
|
-
if (
|
|
52006
|
-
|
|
52030
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Width)/2;
|
|
52031
|
+
if (outSize.Width>rtBG.Height) top=rtBG.Bottom-outSize.Width;
|
|
52032
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Height)/2;
|
|
52007
52033
|
|
|
52008
|
-
|
|
52009
|
-
this.Canvas.
|
|
52010
|
-
|
|
52011
|
-
|
|
52034
|
+
this.Canvas.save();
|
|
52035
|
+
this.Canvas.translate(left, top);
|
|
52036
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52037
|
+
var yText=0,xText=0;
|
|
52038
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52039
|
+
{
|
|
52040
|
+
var item=outSize.AryText[i];
|
|
52041
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52042
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52012
52043
|
|
|
52013
|
-
|
|
52014
|
-
|
|
52015
|
-
|
|
52044
|
+
yText+=item.Height;
|
|
52045
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52046
|
+
}
|
|
52016
52047
|
|
|
52017
|
-
|
|
52018
|
-
|
|
52048
|
+
this.Canvas.restore();
|
|
52049
|
+
}
|
|
52050
|
+
else
|
|
52019
52051
|
{
|
|
52020
|
-
var
|
|
52021
|
-
|
|
52022
|
-
|
|
52023
|
-
|
|
52024
|
-
var
|
|
52025
|
-
|
|
52026
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52052
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52053
|
+
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52054
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52055
|
+
|
|
52056
|
+
var yText=top, xText=left;
|
|
52057
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52027
52058
|
{
|
|
52028
|
-
var
|
|
52029
|
-
if (
|
|
52059
|
+
var item=outSize.AryText[i];
|
|
52060
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52061
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52030
52062
|
|
|
52031
|
-
|
|
52032
|
-
|
|
52033
|
-
|
|
52034
|
-
}
|
|
52035
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52036
|
-
}
|
|
52037
|
-
if (lOffsetWidth == 0)
|
|
52038
|
-
{
|
|
52039
|
-
lOffsetWidth = (xOffset - this.ChartBorder.GetTop()) * this.WidthDiv;
|
|
52063
|
+
yText+=item.Height;
|
|
52064
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52065
|
+
}
|
|
52040
52066
|
}
|
|
52041
|
-
|
|
52042
|
-
var lLeft = xOffset - lOffsetWidth;
|
|
52043
|
-
if (lLeft < this.ChartBorder.GetTop()) lLeft = this.ChartBorder.GetTop();
|
|
52044
|
-
var lHeight = this.ChartBorder.GetRight()-this.ChartBorder.GetLeft();
|
|
52045
|
-
var lWidth = this.ChartBorder.GetBottom() - lLeft;
|
|
52046
|
-
|
|
52047
|
-
this.Canvas.fillStyle = this.BGColor;
|
|
52048
|
-
this.Canvas.fillRect(this.ChartBorder.GetLeft(), lLeft,lHeight,lWidth);
|
|
52049
|
-
|
|
52050
|
-
var xCenter = this.ChartBorder.GetLeft() + lHeight / 2;
|
|
52051
|
-
var yCenter = lLeft + lWidth / 2;
|
|
52052
|
-
this.Canvas.save();
|
|
52053
|
-
this.Canvas.translate(xCenter, yCenter);
|
|
52054
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52055
|
-
this.Canvas.textAlign = 'center';
|
|
52056
|
-
this.Canvas.textBaseline = 'middle';
|
|
52057
|
-
this.Canvas.fillStyle = this.TextColor;
|
|
52058
|
-
this.Canvas.font = this.Font;
|
|
52059
|
-
this.Canvas.fillText(this.Title, 0, 0);
|
|
52060
|
-
this.Canvas.restore();
|
|
52061
|
-
|
|
52062
|
-
this.LockRect={Left:this.ChartBorder.GetLeft(),Top:lLeft,Width:lHeight,Heigh:lWidth}; //保存上锁区域
|
|
52063
52067
|
}
|
|
52064
52068
|
|
|
52065
52069
|
//x,y是否在上锁区域
|
|
52066
52070
|
this.GetTooltipData=function(x,y,tooltip)
|
|
52067
52071
|
{
|
|
52068
|
-
if (this.LockRect
|
|
52072
|
+
if (!this.LockRect) return false;
|
|
52069
52073
|
|
|
52070
|
-
this.
|
|
52071
|
-
this.Canvas.rect(this.LockRect.Left,this.LockRect.Top,this.LockRect.Width,this.LockRect.Height);
|
|
52072
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
52074
|
+
if (Path2DHelper.PtInRect(x,y,this.LockRect))
|
|
52073
52075
|
{
|
|
52074
52076
|
tooltip.Data={ ID:this.LockID, Callback:this.Callback, IndexName:this.IndexName, IndexID:this.IndexID };
|
|
52075
52077
|
tooltip.ChartPaint=this;
|
|
@@ -62324,7 +62326,7 @@ function ChartCorssCursor()
|
|
|
62324
62326
|
|
|
62325
62327
|
this.Draw=function()
|
|
62326
62328
|
{
|
|
62327
|
-
this.Status=
|
|
62329
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
62328
62330
|
this.RightButton.Rect=null;
|
|
62329
62331
|
this.BottomButton.Rect=null;
|
|
62330
62332
|
this.LastValue=null;
|
|
@@ -62471,6 +62473,7 @@ function ChartCorssCursor()
|
|
|
62471
62473
|
}
|
|
62472
62474
|
}
|
|
62473
62475
|
|
|
62476
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
62474
62477
|
this.Canvas.stroke();
|
|
62475
62478
|
this.Canvas.restore();
|
|
62476
62479
|
|
|
@@ -62527,6 +62530,7 @@ function ChartCorssCursor()
|
|
|
62527
62530
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62528
62531
|
}
|
|
62529
62532
|
|
|
62533
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
62530
62534
|
}
|
|
62531
62535
|
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
62532
62536
|
{
|
|
@@ -62534,6 +62538,8 @@ function ChartCorssCursor()
|
|
|
62534
62538
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62535
62539
|
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
62536
62540
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
62541
|
+
|
|
62542
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
62537
62543
|
}
|
|
62538
62544
|
|
|
62539
62545
|
if (rtBG)
|
|
@@ -62543,6 +62549,7 @@ function ChartCorssCursor()
|
|
|
62543
62549
|
this.Canvas.textBaseline="bottom";
|
|
62544
62550
|
this.Canvas.fillStyle=this.TextColor;
|
|
62545
62551
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62552
|
+
|
|
62546
62553
|
}
|
|
62547
62554
|
|
|
62548
62555
|
var complexText=
|
|
@@ -62664,6 +62671,8 @@ function ChartCorssCursor()
|
|
|
62664
62671
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62665
62672
|
|
|
62666
62673
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62674
|
+
|
|
62675
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
62667
62676
|
}
|
|
62668
62677
|
}
|
|
62669
62678
|
else if (this.ShowTextMode.Right==2) //框架内侧显示
|
|
@@ -62677,6 +62686,8 @@ function ChartCorssCursor()
|
|
|
62677
62686
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62678
62687
|
|
|
62679
62688
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62689
|
+
|
|
62690
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
62680
62691
|
}
|
|
62681
62692
|
}
|
|
62682
62693
|
|
|
@@ -62742,6 +62753,8 @@ function ChartCorssCursor()
|
|
|
62742
62753
|
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
62743
62754
|
this.BottomButton.Rect=rtBG;
|
|
62744
62755
|
this.BottomButton.Data=buttonData;
|
|
62756
|
+
|
|
62757
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
62745
62758
|
}
|
|
62746
62759
|
}
|
|
62747
62760
|
|
|
@@ -62790,8 +62803,6 @@ function ChartCorssCursor()
|
|
|
62790
62803
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62791
62804
|
}
|
|
62792
62805
|
}
|
|
62793
|
-
|
|
62794
|
-
this.Status=1;
|
|
62795
62806
|
}
|
|
62796
62807
|
|
|
62797
62808
|
this.DrawComplexRightText=function(rtBG, complexText, size)
|
|
@@ -63079,6 +63090,7 @@ function ChartCorssCursor()
|
|
|
63079
63090
|
|
|
63080
63091
|
this.HScreenDraw=function()
|
|
63081
63092
|
{
|
|
63093
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
63082
63094
|
var x=this.LastPoint.X;
|
|
63083
63095
|
var y=this.LastPoint.Y;
|
|
63084
63096
|
|
|
@@ -63172,6 +63184,8 @@ function ChartCorssCursor()
|
|
|
63172
63184
|
}
|
|
63173
63185
|
}
|
|
63174
63186
|
|
|
63187
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
63188
|
+
|
|
63175
63189
|
this.Canvas.stroke();
|
|
63176
63190
|
this.Canvas.restore();
|
|
63177
63191
|
|
|
@@ -63232,6 +63246,8 @@ function ChartCorssCursor()
|
|
|
63232
63246
|
}
|
|
63233
63247
|
|
|
63234
63248
|
this.Canvas.restore();
|
|
63249
|
+
|
|
63250
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
63235
63251
|
}
|
|
63236
63252
|
else if (this.ShowTextMode.Left==2)
|
|
63237
63253
|
{
|
|
@@ -63249,6 +63265,8 @@ function ChartCorssCursor()
|
|
|
63249
63265
|
this.Canvas.fillText(text,2,0,textWidth);
|
|
63250
63266
|
|
|
63251
63267
|
this.Canvas.restore();
|
|
63268
|
+
|
|
63269
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
63252
63270
|
}
|
|
63253
63271
|
|
|
63254
63272
|
if (this.StringFormatY.RText)
|
|
@@ -63319,6 +63337,8 @@ function ChartCorssCursor()
|
|
|
63319
63337
|
}
|
|
63320
63338
|
|
|
63321
63339
|
this.Canvas.restore();
|
|
63340
|
+
|
|
63341
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
63322
63342
|
}
|
|
63323
63343
|
else if (this.ShowTextMode.Right==2)
|
|
63324
63344
|
{
|
|
@@ -63336,6 +63356,8 @@ function ChartCorssCursor()
|
|
|
63336
63356
|
this.Canvas.fillText(text,-2,0,textWidth);
|
|
63337
63357
|
|
|
63338
63358
|
this.Canvas.restore();
|
|
63359
|
+
|
|
63360
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
63339
63361
|
}
|
|
63340
63362
|
}
|
|
63341
63363
|
|
|
@@ -63409,10 +63431,10 @@ function ChartCorssCursor()
|
|
|
63409
63431
|
|
|
63410
63432
|
this.Canvas.restore();
|
|
63411
63433
|
}
|
|
63434
|
+
|
|
63435
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
63412
63436
|
}
|
|
63413
63437
|
}
|
|
63414
|
-
|
|
63415
|
-
this.Status=1;
|
|
63416
63438
|
}
|
|
63417
63439
|
|
|
63418
63440
|
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
@@ -63484,6 +63506,7 @@ function ChartCorssCursor()
|
|
|
63484
63506
|
}
|
|
63485
63507
|
|
|
63486
63508
|
|
|
63509
|
+
|
|
63487
63510
|
////////////////////////////////////////////////////////////////////////////////
|
|
63488
63511
|
//深度图十字光标
|
|
63489
63512
|
function DepthChartCorssCursor()
|
|
@@ -90669,6 +90692,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90669
90692
|
if (!item.Frame.LockPaint.GetTooltipData(x,y,tooltip)) continue;
|
|
90670
90693
|
|
|
90671
90694
|
tooltip.HQChart=this;
|
|
90695
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
90696
|
+
if (event && event.Callback)
|
|
90697
|
+
{
|
|
90698
|
+
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
90699
|
+
event.Callback(event,sendData,this);
|
|
90700
|
+
}
|
|
90701
|
+
|
|
90672
90702
|
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
90673
90703
|
return true;
|
|
90674
90704
|
}
|
|
@@ -153872,7 +153902,7 @@ function ScrollBarBGChart()
|
|
|
153872
153902
|
|
|
153873
153903
|
|
|
153874
153904
|
|
|
153875
|
-
var HQCHART_VERSION="1.1.
|
|
153905
|
+
var HQCHART_VERSION="1.1.15103";
|
|
153876
153906
|
|
|
153877
153907
|
function PrintHQChartVersion()
|
|
153878
153908
|
{
|
|
@@ -154026,7 +154056,8 @@ export default {
|
|
|
154026
154056
|
JSCHART_DATA_FIELD_ID:JSCHART_DATA_FIELD_ID,
|
|
154027
154057
|
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
154028
154058
|
JSCHART_MENU_ID:JSCHART_MENU_ID,
|
|
154029
|
-
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID,
|
|
154059
|
+
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
|
|
154060
|
+
JSCHART_CORSSCURSOR_STATUS_ID:JSCHART_CORSSCURSOR_STATUS_ID, //十字光标状态
|
|
154030
154061
|
},
|
|
154031
154062
|
}
|
|
154032
154063
|
|