hqchart 1.1.15091 → 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.
|
@@ -7036,6 +7036,8 @@ var JSCHART_EVENT_ID=
|
|
|
7036
7036
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
7037
7037
|
|
|
7038
7038
|
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
7039
|
+
ON_CLICK_INDEX_LOCK:178, //点击指标锁
|
|
7040
|
+
ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
|
|
7039
7041
|
}
|
|
7040
7042
|
|
|
7041
7043
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7273,6 +7275,18 @@ var JSCHART_TRADE_STATUS_ID=
|
|
|
7273
7275
|
SUSP_ID:1, //停牌
|
|
7274
7276
|
}
|
|
7275
7277
|
|
|
7278
|
+
//十字光标状态
|
|
7279
|
+
var JSCHART_CORSSCURSOR_STATUS_ID=
|
|
7280
|
+
{
|
|
7281
|
+
NONE_ID:0,
|
|
7282
|
+
LINE_ID:1,
|
|
7283
|
+
LEFT_TEXT_ID:2,
|
|
7284
|
+
LEFT_INTER_TEXT_ID:4,
|
|
7285
|
+
RIGHT_TEXT_ID:8,
|
|
7286
|
+
RIGHT_INTER_TEXT_ID:16,
|
|
7287
|
+
BOTTOM_TEXT_ID:32,
|
|
7288
|
+
}
|
|
7289
|
+
|
|
7276
7290
|
|
|
7277
7291
|
function PhoneDBClick()
|
|
7278
7292
|
{
|
|
@@ -7489,6 +7503,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7489
7503
|
//锁十字光标
|
|
7490
7504
|
LockCorssCursor:{ X:{ Enable:false } },
|
|
7491
7505
|
|
|
7506
|
+
CorssCursorStatus:{ Value:null }, //十字光标状态 只读
|
|
7507
|
+
|
|
7492
7508
|
//图形中的单元选中状态
|
|
7493
7509
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
7494
7510
|
|
|
@@ -7655,6 +7671,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7655
7671
|
this.BuySellData.ArySell=null;
|
|
7656
7672
|
}
|
|
7657
7673
|
|
|
7674
|
+
this.UpdateCorssCursorStatus=function()
|
|
7675
|
+
{
|
|
7676
|
+
if (!this.ChartCorssCursor) return false;
|
|
7677
|
+
if (!this.GlobalOption || !this.GlobalOption.CorssCursorStatus) return false;
|
|
7678
|
+
|
|
7679
|
+
var status=this.ChartCorssCursor.Status;
|
|
7680
|
+
|
|
7681
|
+
//状态改变了
|
|
7682
|
+
if (this.GlobalOption.CorssCursorStatus.Value!=status)
|
|
7683
|
+
{
|
|
7684
|
+
this.GlobalOption.CorssCursorStatus.Value=status;
|
|
7685
|
+
|
|
7686
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CORSSCURSOR_STATUS_CHANGE);
|
|
7687
|
+
if (event && event.Callback)
|
|
7688
|
+
{
|
|
7689
|
+
var sendData={ Status:status, IsShowLine:(status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0 };
|
|
7690
|
+
event.Callback(event, sendData, this);
|
|
7691
|
+
}
|
|
7692
|
+
}
|
|
7693
|
+
|
|
7694
|
+
return true;
|
|
7695
|
+
}
|
|
7696
|
+
|
|
7658
7697
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
7659
7698
|
{
|
|
7660
7699
|
if (this.JSPopMenu) return;
|
|
@@ -10622,6 +10661,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10622
10661
|
this.Frame.ClearCoordinateText();
|
|
10623
10662
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
10624
10663
|
this.ChartSplashPaint.Draw();
|
|
10664
|
+
this.UpdateCorssCursorStatus();
|
|
10625
10665
|
return;
|
|
10626
10666
|
}
|
|
10627
10667
|
|
|
@@ -10914,6 +10954,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10914
10954
|
}
|
|
10915
10955
|
|
|
10916
10956
|
++this.TouchDrawCount;
|
|
10957
|
+
|
|
10958
|
+
this.UpdateCorssCursorStatus();
|
|
10917
10959
|
}
|
|
10918
10960
|
|
|
10919
10961
|
this.DrawExtendChartPaint=function(level, option)
|
|
@@ -11393,39 +11435,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11393
11435
|
exChartOption.Tooltip=option.Tooltip;
|
|
11394
11436
|
exChartOption.Point=option.Point;
|
|
11395
11437
|
}
|
|
11396
|
-
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11397
|
-
/*
|
|
11398
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形 在动态标题以后画
|
|
11399
|
-
{
|
|
11400
|
-
var item=this.ExtendChartPaint[i];
|
|
11401
|
-
if (item.IsCallbackDraw) continue;
|
|
11402
|
-
if (item.DrawAfterPicture) continue;
|
|
11403
|
-
if (item.ClassName=='KLineTooltipPaint' && option)
|
|
11404
|
-
{
|
|
11405
|
-
if (option.Tooltip==false) continue;
|
|
11406
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
11407
|
-
}
|
|
11408
|
-
else if (item.ClassName=="MinuteTooltipPaint" && option)
|
|
11409
|
-
{
|
|
11410
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
11411
|
-
}
|
|
11412
|
-
|
|
11413
|
-
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
11414
|
-
}
|
|
11415
|
-
*/
|
|
11416
11438
|
|
|
11439
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11440
|
+
|
|
11417
11441
|
if (this.EnableAnimation) this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_30);
|
|
11418
|
-
|
|
11419
|
-
if (this.EnableAnimation)
|
|
11420
|
-
{
|
|
11421
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动画
|
|
11422
|
-
{
|
|
11423
|
-
var item=this.ExtendChartPaint[i];
|
|
11424
|
-
if (item.IsAnimation===true) item.Draw();
|
|
11425
|
-
}
|
|
11426
|
-
}
|
|
11427
|
-
*/
|
|
11428
|
-
|
|
11442
|
+
|
|
11429
11443
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
11430
11444
|
{
|
|
11431
11445
|
var item=this.ChartDrawPicture[i];
|
|
@@ -11451,15 +11465,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11451
11465
|
}
|
|
11452
11466
|
|
|
11453
11467
|
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50);
|
|
11454
|
-
|
|
11455
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
11456
|
-
{
|
|
11457
|
-
var item=this.ExtendChartPaint[i];
|
|
11458
|
-
if (item.DrawAfterPicture)
|
|
11459
|
-
item.Draw();
|
|
11460
|
-
}
|
|
11461
|
-
*/
|
|
11462
|
-
|
|
11468
|
+
|
|
11463
11469
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
11464
11470
|
{
|
|
11465
11471
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
@@ -11471,6 +11477,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11471
11477
|
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
11472
11478
|
|
|
11473
11479
|
++this.TouchDrawCount;
|
|
11480
|
+
|
|
11481
|
+
this.UpdateCorssCursorStatus();
|
|
11474
11482
|
}
|
|
11475
11483
|
|
|
11476
11484
|
this.DrawAnimation=function() //绘制动画 如弹幕
|
|
@@ -51926,7 +51934,6 @@ function ChartLock()
|
|
|
51926
51934
|
delete this.newMethod;
|
|
51927
51935
|
|
|
51928
51936
|
this.ClassName="ChartLock";
|
|
51929
|
-
this.WidthDiv = 0.2; // 框子宽度占比
|
|
51930
51937
|
this.LockCount = 20; // 锁最新的几个数据
|
|
51931
51938
|
this.BGColor = g_JSChartResource.IndexLock.BGColor;
|
|
51932
51939
|
this.TextColor = g_JSChartResource.IndexLock.TextColor;
|
|
@@ -51937,7 +51944,6 @@ function ChartLock()
|
|
|
51937
51944
|
this.Callback; //回调
|
|
51938
51945
|
this.IndexName; //指标名字
|
|
51939
51946
|
this.IndexID; //指标ID
|
|
51940
|
-
this.MinWidth=null; //最小宽度
|
|
51941
51947
|
|
|
51942
51948
|
|
|
51943
51949
|
this.CalculateTextSize=function(aryText, defaultFont, out)
|
|
@@ -51980,70 +51986,78 @@ function ChartLock()
|
|
|
51980
51986
|
return true;
|
|
51981
51987
|
}
|
|
51982
51988
|
|
|
51983
|
-
this.Draw=function(
|
|
51989
|
+
this.Draw=function(bDraw)
|
|
51984
51990
|
{
|
|
51985
51991
|
this.LockRect=null;
|
|
51992
|
+
if (!bDraw) return;
|
|
51986
51993
|
if (this.NotSupportMessage)
|
|
51987
51994
|
{
|
|
51988
51995
|
this.DrawNotSupportmessage();
|
|
51989
51996
|
return;
|
|
51990
51997
|
}
|
|
51991
51998
|
|
|
51992
|
-
|
|
51999
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
52000
|
+
var bMinute=this.IsMinuteFrame();
|
|
52001
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
52002
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
52003
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
52004
|
+
var border=this.ChartFrame.GetBorder();
|
|
52005
|
+
if (bHScreen)
|
|
51993
52006
|
{
|
|
51994
|
-
|
|
51995
|
-
|
|
52007
|
+
var chartright=border.BottomEx;
|
|
52008
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
52009
|
+
}
|
|
52010
|
+
else
|
|
52011
|
+
{
|
|
52012
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
52013
|
+
var chartright=border.RightEx;
|
|
51996
52014
|
}
|
|
51997
52015
|
|
|
51998
|
-
var
|
|
51999
|
-
var
|
|
52000
|
-
|
|
52001
|
-
if (this.ChartFrame.Data != null)
|
|
52016
|
+
var kData=this.ChartFrame.Data;
|
|
52017
|
+
var left=xOffset;
|
|
52018
|
+
if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
|
|
52002
52019
|
{
|
|
52003
|
-
var
|
|
52004
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
52005
|
-
xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+2.0;
|
|
52006
|
-
var chartright=this.ChartBorder.GetRight();
|
|
52007
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
52008
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52020
|
+
for(var i=kData.DataOffset,j=0;i<kData.Data.length-this.LockCount && j<xPointCount-this.LockCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52009
52021
|
{
|
|
52010
|
-
var
|
|
52011
|
-
if (
|
|
52022
|
+
var kItem=kData.Data[i];
|
|
52023
|
+
if (kItem.Open==null || kItem.High==null || kItem.Low==null || kItem.Close==null) continue;
|
|
52012
52024
|
|
|
52013
|
-
|
|
52014
|
-
|
|
52015
|
-
|
|
52025
|
+
if (bMinute)
|
|
52026
|
+
{
|
|
52027
|
+
left=this.ChartFrame.GetXFromIndex(j);
|
|
52028
|
+
}
|
|
52029
|
+
else
|
|
52030
|
+
{
|
|
52031
|
+
left=xOffset;
|
|
52032
|
+
var right=xOffset+dataWidth;
|
|
52033
|
+
if (right>chartright) break;
|
|
52034
|
+
}
|
|
52016
52035
|
}
|
|
52017
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52018
52036
|
}
|
|
52019
|
-
|
|
52037
|
+
|
|
52038
|
+
if (bHScreen)
|
|
52020
52039
|
{
|
|
52021
|
-
|
|
52022
|
-
|
|
52023
|
-
|
|
52024
|
-
if (lLeft < this.ChartBorder.GetLeft())
|
|
52025
|
-
lLeft = this.ChartBorder.GetLeft();
|
|
52026
|
-
var lWidth = this.ChartBorder.GetRight() - lLeft;
|
|
52040
|
+
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
52041
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52042
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52027
52043
|
|
|
52028
|
-
|
|
52044
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
52045
|
+
this.Canvas.fillStyle =bgColor;
|
|
52046
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52047
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52048
|
+
}
|
|
52049
|
+
else
|
|
52029
52050
|
{
|
|
52030
|
-
|
|
52031
|
-
|
|
52032
|
-
|
|
52051
|
+
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
52052
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52053
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52054
|
+
//上下渐变
|
|
52055
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52056
|
+
this.Canvas.fillStyle =bgColor;
|
|
52057
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52058
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52033
52059
|
}
|
|
52034
52060
|
|
|
52035
|
-
var rtBG={ Left:lLeft, Top:border.TopTitle, Bottom:border.Bottom, Width:lWidth };
|
|
52036
|
-
rtBG.Right=rtBG.Width+rtBG.Left;
|
|
52037
|
-
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52038
|
-
this.LockRect=rtBG; //保存上锁区域
|
|
52039
|
-
|
|
52040
|
-
if (!isDraw) return;
|
|
52041
|
-
|
|
52042
|
-
//上下渐变
|
|
52043
|
-
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52044
|
-
this.Canvas.fillStyle =bgColor;
|
|
52045
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52046
|
-
|
|
52047
52061
|
var aryText=null;
|
|
52048
52062
|
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
52049
52063
|
else aryText=[{Text:this.Title}];
|
|
@@ -52051,85 +52065,57 @@ function ChartLock()
|
|
|
52051
52065
|
var outSize={ };
|
|
52052
52066
|
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
52053
52067
|
|
|
52054
|
-
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52055
|
-
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52056
|
-
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52057
|
-
|
|
52058
52068
|
this.Canvas.textAlign='left';
|
|
52059
52069
|
this.Canvas.textBaseline='bottom';
|
|
52060
52070
|
this.Canvas.font = this.Font;
|
|
52061
|
-
|
|
52062
|
-
|
|
52071
|
+
|
|
52072
|
+
if (bHScreen)
|
|
52063
52073
|
{
|
|
52064
|
-
var
|
|
52065
|
-
if (
|
|
52066
|
-
|
|
52074
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Width)/2;
|
|
52075
|
+
if (outSize.Width>rtBG.Height) top=rtBG.Bottom-outSize.Width;
|
|
52076
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Height)/2;
|
|
52067
52077
|
|
|
52068
|
-
|
|
52069
|
-
this.Canvas.
|
|
52070
|
-
|
|
52071
|
-
|
|
52078
|
+
this.Canvas.save();
|
|
52079
|
+
this.Canvas.translate(left, top);
|
|
52080
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52081
|
+
var yText=0,xText=0;
|
|
52082
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52083
|
+
{
|
|
52084
|
+
var item=outSize.AryText[i];
|
|
52085
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52086
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52072
52087
|
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
|
|
52088
|
+
yText+=item.Height;
|
|
52089
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52090
|
+
}
|
|
52076
52091
|
|
|
52077
|
-
|
|
52078
|
-
|
|
52092
|
+
this.Canvas.restore();
|
|
52093
|
+
}
|
|
52094
|
+
else
|
|
52079
52095
|
{
|
|
52080
|
-
var
|
|
52081
|
-
|
|
52082
|
-
|
|
52083
|
-
|
|
52084
|
-
var
|
|
52085
|
-
|
|
52086
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52096
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52097
|
+
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52098
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52099
|
+
|
|
52100
|
+
var yText=top, xText=left;
|
|
52101
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52087
52102
|
{
|
|
52088
|
-
var
|
|
52089
|
-
if (
|
|
52103
|
+
var item=outSize.AryText[i];
|
|
52104
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52105
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52090
52106
|
|
|
52091
|
-
|
|
52092
|
-
|
|
52093
|
-
|
|
52094
|
-
}
|
|
52095
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52096
|
-
}
|
|
52097
|
-
if (lOffsetWidth == 0)
|
|
52098
|
-
{
|
|
52099
|
-
lOffsetWidth = (xOffset - this.ChartBorder.GetTop()) * this.WidthDiv;
|
|
52107
|
+
yText+=item.Height;
|
|
52108
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52109
|
+
}
|
|
52100
52110
|
}
|
|
52101
|
-
|
|
52102
|
-
var lLeft = xOffset - lOffsetWidth;
|
|
52103
|
-
if (lLeft < this.ChartBorder.GetTop()) lLeft = this.ChartBorder.GetTop();
|
|
52104
|
-
var lHeight = this.ChartBorder.GetRight()-this.ChartBorder.GetLeft();
|
|
52105
|
-
var lWidth = this.ChartBorder.GetBottom() - lLeft;
|
|
52106
|
-
|
|
52107
|
-
this.Canvas.fillStyle = this.BGColor;
|
|
52108
|
-
this.Canvas.fillRect(this.ChartBorder.GetLeft(), lLeft,lHeight,lWidth);
|
|
52109
|
-
|
|
52110
|
-
var xCenter = this.ChartBorder.GetLeft() + lHeight / 2;
|
|
52111
|
-
var yCenter = lLeft + lWidth / 2;
|
|
52112
|
-
this.Canvas.save();
|
|
52113
|
-
this.Canvas.translate(xCenter, yCenter);
|
|
52114
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52115
|
-
this.Canvas.textAlign = 'center';
|
|
52116
|
-
this.Canvas.textBaseline = 'middle';
|
|
52117
|
-
this.Canvas.fillStyle = this.TextColor;
|
|
52118
|
-
this.Canvas.font = this.Font;
|
|
52119
|
-
this.Canvas.fillText(this.Title, 0, 0);
|
|
52120
|
-
this.Canvas.restore();
|
|
52121
|
-
|
|
52122
|
-
this.LockRect={Left:this.ChartBorder.GetLeft(),Top:lLeft,Width:lHeight,Heigh:lWidth}; //保存上锁区域
|
|
52123
52111
|
}
|
|
52124
52112
|
|
|
52125
52113
|
//x,y是否在上锁区域
|
|
52126
52114
|
this.GetTooltipData=function(x,y,tooltip)
|
|
52127
52115
|
{
|
|
52128
|
-
if (this.LockRect
|
|
52116
|
+
if (!this.LockRect) return false;
|
|
52129
52117
|
|
|
52130
|
-
this.
|
|
52131
|
-
this.Canvas.rect(this.LockRect.Left,this.LockRect.Top,this.LockRect.Width,this.LockRect.Height);
|
|
52132
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
52118
|
+
if (Path2DHelper.PtInRect(x,y,this.LockRect))
|
|
52133
52119
|
{
|
|
52134
52120
|
tooltip.Data={ ID:this.LockID, Callback:this.Callback, IndexName:this.IndexName, IndexID:this.IndexID };
|
|
52135
52121
|
tooltip.ChartPaint=this;
|
|
@@ -62384,7 +62370,7 @@ function ChartCorssCursor()
|
|
|
62384
62370
|
|
|
62385
62371
|
this.Draw=function()
|
|
62386
62372
|
{
|
|
62387
|
-
this.Status=
|
|
62373
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
62388
62374
|
this.RightButton.Rect=null;
|
|
62389
62375
|
this.BottomButton.Rect=null;
|
|
62390
62376
|
this.LastValue=null;
|
|
@@ -62531,6 +62517,7 @@ function ChartCorssCursor()
|
|
|
62531
62517
|
}
|
|
62532
62518
|
}
|
|
62533
62519
|
|
|
62520
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
62534
62521
|
this.Canvas.stroke();
|
|
62535
62522
|
this.Canvas.restore();
|
|
62536
62523
|
|
|
@@ -62587,6 +62574,7 @@ function ChartCorssCursor()
|
|
|
62587
62574
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62588
62575
|
}
|
|
62589
62576
|
|
|
62577
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
62590
62578
|
}
|
|
62591
62579
|
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
62592
62580
|
{
|
|
@@ -62594,6 +62582,8 @@ function ChartCorssCursor()
|
|
|
62594
62582
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62595
62583
|
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
62596
62584
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
62585
|
+
|
|
62586
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
62597
62587
|
}
|
|
62598
62588
|
|
|
62599
62589
|
if (rtBG)
|
|
@@ -62603,6 +62593,7 @@ function ChartCorssCursor()
|
|
|
62603
62593
|
this.Canvas.textBaseline="bottom";
|
|
62604
62594
|
this.Canvas.fillStyle=this.TextColor;
|
|
62605
62595
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62596
|
+
|
|
62606
62597
|
}
|
|
62607
62598
|
|
|
62608
62599
|
var complexText=
|
|
@@ -62724,6 +62715,8 @@ function ChartCorssCursor()
|
|
|
62724
62715
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62725
62716
|
|
|
62726
62717
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62718
|
+
|
|
62719
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
62727
62720
|
}
|
|
62728
62721
|
}
|
|
62729
62722
|
else if (this.ShowTextMode.Right==2) //框架内侧显示
|
|
@@ -62737,6 +62730,8 @@ function ChartCorssCursor()
|
|
|
62737
62730
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62738
62731
|
|
|
62739
62732
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62733
|
+
|
|
62734
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
62740
62735
|
}
|
|
62741
62736
|
}
|
|
62742
62737
|
|
|
@@ -62802,6 +62797,8 @@ function ChartCorssCursor()
|
|
|
62802
62797
|
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
62803
62798
|
this.BottomButton.Rect=rtBG;
|
|
62804
62799
|
this.BottomButton.Data=buttonData;
|
|
62800
|
+
|
|
62801
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
62805
62802
|
}
|
|
62806
62803
|
}
|
|
62807
62804
|
|
|
@@ -62850,8 +62847,6 @@ function ChartCorssCursor()
|
|
|
62850
62847
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62851
62848
|
}
|
|
62852
62849
|
}
|
|
62853
|
-
|
|
62854
|
-
this.Status=1;
|
|
62855
62850
|
}
|
|
62856
62851
|
|
|
62857
62852
|
this.DrawComplexRightText=function(rtBG, complexText, size)
|
|
@@ -63139,6 +63134,7 @@ function ChartCorssCursor()
|
|
|
63139
63134
|
|
|
63140
63135
|
this.HScreenDraw=function()
|
|
63141
63136
|
{
|
|
63137
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
63142
63138
|
var x=this.LastPoint.X;
|
|
63143
63139
|
var y=this.LastPoint.Y;
|
|
63144
63140
|
|
|
@@ -63232,6 +63228,8 @@ function ChartCorssCursor()
|
|
|
63232
63228
|
}
|
|
63233
63229
|
}
|
|
63234
63230
|
|
|
63231
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
63232
|
+
|
|
63235
63233
|
this.Canvas.stroke();
|
|
63236
63234
|
this.Canvas.restore();
|
|
63237
63235
|
|
|
@@ -63292,6 +63290,8 @@ function ChartCorssCursor()
|
|
|
63292
63290
|
}
|
|
63293
63291
|
|
|
63294
63292
|
this.Canvas.restore();
|
|
63293
|
+
|
|
63294
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
63295
63295
|
}
|
|
63296
63296
|
else if (this.ShowTextMode.Left==2)
|
|
63297
63297
|
{
|
|
@@ -63309,6 +63309,8 @@ function ChartCorssCursor()
|
|
|
63309
63309
|
this.Canvas.fillText(text,2,0,textWidth);
|
|
63310
63310
|
|
|
63311
63311
|
this.Canvas.restore();
|
|
63312
|
+
|
|
63313
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
63312
63314
|
}
|
|
63313
63315
|
|
|
63314
63316
|
if (this.StringFormatY.RText)
|
|
@@ -63379,6 +63381,8 @@ function ChartCorssCursor()
|
|
|
63379
63381
|
}
|
|
63380
63382
|
|
|
63381
63383
|
this.Canvas.restore();
|
|
63384
|
+
|
|
63385
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
63382
63386
|
}
|
|
63383
63387
|
else if (this.ShowTextMode.Right==2)
|
|
63384
63388
|
{
|
|
@@ -63396,6 +63400,8 @@ function ChartCorssCursor()
|
|
|
63396
63400
|
this.Canvas.fillText(text,-2,0,textWidth);
|
|
63397
63401
|
|
|
63398
63402
|
this.Canvas.restore();
|
|
63403
|
+
|
|
63404
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
63399
63405
|
}
|
|
63400
63406
|
}
|
|
63401
63407
|
|
|
@@ -63469,10 +63475,10 @@ function ChartCorssCursor()
|
|
|
63469
63475
|
|
|
63470
63476
|
this.Canvas.restore();
|
|
63471
63477
|
}
|
|
63478
|
+
|
|
63479
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
63472
63480
|
}
|
|
63473
63481
|
}
|
|
63474
|
-
|
|
63475
|
-
this.Status=1;
|
|
63476
63482
|
}
|
|
63477
63483
|
|
|
63478
63484
|
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
@@ -63544,6 +63550,7 @@ function ChartCorssCursor()
|
|
|
63544
63550
|
}
|
|
63545
63551
|
|
|
63546
63552
|
|
|
63553
|
+
|
|
63547
63554
|
////////////////////////////////////////////////////////////////////////////////
|
|
63548
63555
|
//深度图十字光标
|
|
63549
63556
|
function DepthChartCorssCursor()
|
|
@@ -90729,6 +90736,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90729
90736
|
if (!item.Frame.LockPaint.GetTooltipData(x,y,tooltip)) continue;
|
|
90730
90737
|
|
|
90731
90738
|
tooltip.HQChart=this;
|
|
90739
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
90740
|
+
if (event && event.Callback)
|
|
90741
|
+
{
|
|
90742
|
+
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
90743
|
+
event.Callback(event,sendData,this);
|
|
90744
|
+
}
|
|
90745
|
+
|
|
90732
90746
|
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
90733
90747
|
return true;
|
|
90734
90748
|
}
|
|
@@ -165768,7 +165782,7 @@ function HQChartScriptWorker()
|
|
|
165768
165782
|
|
|
165769
165783
|
|
|
165770
165784
|
|
|
165771
|
-
var HQCHART_VERSION="1.1.
|
|
165785
|
+
var HQCHART_VERSION="1.1.15103";
|
|
165772
165786
|
|
|
165773
165787
|
function PrintHQChartVersion()
|
|
165774
165788
|
{
|
|
@@ -165934,6 +165948,7 @@ export default {
|
|
|
165934
165948
|
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
165935
165949
|
JSCHART_MENU_ID:JSCHART_MENU_ID,
|
|
165936
165950
|
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
|
|
165951
|
+
JSCHART_CORSSCURSOR_STATUS_ID:JSCHART_CORSSCURSOR_STATUS_ID, //十字光标状态
|
|
165937
165952
|
},
|
|
165938
165953
|
|
|
165939
165954
|
|