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.
package/src/jscommon/umychart.js
CHANGED
|
@@ -2896,6 +2896,8 @@ var JSCHART_EVENT_ID=
|
|
|
2896
2896
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
2897
2897
|
|
|
2898
2898
|
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
2899
|
+
ON_CLICK_INDEX_LOCK:178, //点击指标锁
|
|
2900
|
+
ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
|
|
2899
2901
|
}
|
|
2900
2902
|
|
|
2901
2903
|
var JSCHART_OPERATOR_ID=
|
|
@@ -3133,6 +3135,18 @@ var JSCHART_TRADE_STATUS_ID=
|
|
|
3133
3135
|
SUSP_ID:1, //停牌
|
|
3134
3136
|
}
|
|
3135
3137
|
|
|
3138
|
+
//十字光标状态
|
|
3139
|
+
var JSCHART_CORSSCURSOR_STATUS_ID=
|
|
3140
|
+
{
|
|
3141
|
+
NONE_ID:0,
|
|
3142
|
+
LINE_ID:1,
|
|
3143
|
+
LEFT_TEXT_ID:2,
|
|
3144
|
+
LEFT_INTER_TEXT_ID:4,
|
|
3145
|
+
RIGHT_TEXT_ID:8,
|
|
3146
|
+
RIGHT_INTER_TEXT_ID:16,
|
|
3147
|
+
BOTTOM_TEXT_ID:32,
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3136
3150
|
|
|
3137
3151
|
function PhoneDBClick()
|
|
3138
3152
|
{
|
|
@@ -3349,6 +3363,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3349
3363
|
//锁十字光标
|
|
3350
3364
|
LockCorssCursor:{ X:{ Enable:false } },
|
|
3351
3365
|
|
|
3366
|
+
CorssCursorStatus:{ Value:null }, //十字光标状态 只读
|
|
3367
|
+
|
|
3352
3368
|
//图形中的单元选中状态
|
|
3353
3369
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
3354
3370
|
|
|
@@ -3515,6 +3531,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3515
3531
|
this.BuySellData.ArySell=null;
|
|
3516
3532
|
}
|
|
3517
3533
|
|
|
3534
|
+
this.UpdateCorssCursorStatus=function()
|
|
3535
|
+
{
|
|
3536
|
+
if (!this.ChartCorssCursor) return false;
|
|
3537
|
+
if (!this.GlobalOption || !this.GlobalOption.CorssCursorStatus) return false;
|
|
3538
|
+
|
|
3539
|
+
var status=this.ChartCorssCursor.Status;
|
|
3540
|
+
|
|
3541
|
+
//状态改变了
|
|
3542
|
+
if (this.GlobalOption.CorssCursorStatus.Value!=status)
|
|
3543
|
+
{
|
|
3544
|
+
this.GlobalOption.CorssCursorStatus.Value=status;
|
|
3545
|
+
|
|
3546
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CORSSCURSOR_STATUS_CHANGE);
|
|
3547
|
+
if (event && event.Callback)
|
|
3548
|
+
{
|
|
3549
|
+
var sendData={ Status:status, IsShowLine:(status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0 };
|
|
3550
|
+
event.Callback(event, sendData, this);
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
return true;
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3518
3557
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
3519
3558
|
{
|
|
3520
3559
|
if (this.JSPopMenu) return;
|
|
@@ -6482,6 +6521,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6482
6521
|
this.Frame.ClearCoordinateText();
|
|
6483
6522
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
6484
6523
|
this.ChartSplashPaint.Draw();
|
|
6524
|
+
this.UpdateCorssCursorStatus();
|
|
6485
6525
|
return;
|
|
6486
6526
|
}
|
|
6487
6527
|
|
|
@@ -6774,6 +6814,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6774
6814
|
}
|
|
6775
6815
|
|
|
6776
6816
|
++this.TouchDrawCount;
|
|
6817
|
+
|
|
6818
|
+
this.UpdateCorssCursorStatus();
|
|
6777
6819
|
}
|
|
6778
6820
|
|
|
6779
6821
|
this.DrawExtendChartPaint=function(level, option)
|
|
@@ -7253,39 +7295,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7253
7295
|
exChartOption.Tooltip=option.Tooltip;
|
|
7254
7296
|
exChartOption.Point=option.Point;
|
|
7255
7297
|
}
|
|
7256
|
-
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
7257
|
-
/*
|
|
7258
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形 在动态标题以后画
|
|
7259
|
-
{
|
|
7260
|
-
var item=this.ExtendChartPaint[i];
|
|
7261
|
-
if (item.IsCallbackDraw) continue;
|
|
7262
|
-
if (item.DrawAfterPicture) continue;
|
|
7263
|
-
if (item.ClassName=='KLineTooltipPaint' && option)
|
|
7264
|
-
{
|
|
7265
|
-
if (option.Tooltip==false) continue;
|
|
7266
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
7267
|
-
}
|
|
7268
|
-
else if (item.ClassName=="MinuteTooltipPaint" && option)
|
|
7269
|
-
{
|
|
7270
|
-
if (option.Point) item.LatestPoint=option.Point;
|
|
7271
|
-
}
|
|
7272
|
-
|
|
7273
|
-
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
7274
|
-
}
|
|
7275
|
-
*/
|
|
7276
7298
|
|
|
7299
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
7300
|
+
|
|
7277
7301
|
if (this.EnableAnimation) this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_30);
|
|
7278
|
-
|
|
7279
|
-
if (this.EnableAnimation)
|
|
7280
|
-
{
|
|
7281
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动画
|
|
7282
|
-
{
|
|
7283
|
-
var item=this.ExtendChartPaint[i];
|
|
7284
|
-
if (item.IsAnimation===true) item.Draw();
|
|
7285
|
-
}
|
|
7286
|
-
}
|
|
7287
|
-
*/
|
|
7288
|
-
|
|
7302
|
+
|
|
7289
7303
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
7290
7304
|
{
|
|
7291
7305
|
var item=this.ChartDrawPicture[i];
|
|
@@ -7311,15 +7325,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7311
7325
|
}
|
|
7312
7326
|
|
|
7313
7327
|
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50);
|
|
7314
|
-
|
|
7315
|
-
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
7316
|
-
{
|
|
7317
|
-
var item=this.ExtendChartPaint[i];
|
|
7318
|
-
if (item.DrawAfterPicture)
|
|
7319
|
-
item.Draw();
|
|
7320
|
-
}
|
|
7321
|
-
*/
|
|
7322
|
-
|
|
7328
|
+
|
|
7323
7329
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
7324
7330
|
{
|
|
7325
7331
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
@@ -7331,6 +7337,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7331
7337
|
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
7332
7338
|
|
|
7333
7339
|
++this.TouchDrawCount;
|
|
7340
|
+
|
|
7341
|
+
this.UpdateCorssCursorStatus();
|
|
7334
7342
|
}
|
|
7335
7343
|
|
|
7336
7344
|
this.DrawAnimation=function() //绘制动画 如弹幕
|
|
@@ -47786,7 +47794,6 @@ function ChartLock()
|
|
|
47786
47794
|
delete this.newMethod;
|
|
47787
47795
|
|
|
47788
47796
|
this.ClassName="ChartLock";
|
|
47789
|
-
this.WidthDiv = 0.2; // 框子宽度占比
|
|
47790
47797
|
this.LockCount = 20; // 锁最新的几个数据
|
|
47791
47798
|
this.BGColor = g_JSChartResource.IndexLock.BGColor;
|
|
47792
47799
|
this.TextColor = g_JSChartResource.IndexLock.TextColor;
|
|
@@ -47797,7 +47804,6 @@ function ChartLock()
|
|
|
47797
47804
|
this.Callback; //回调
|
|
47798
47805
|
this.IndexName; //指标名字
|
|
47799
47806
|
this.IndexID; //指标ID
|
|
47800
|
-
this.MinWidth=null; //最小宽度
|
|
47801
47807
|
|
|
47802
47808
|
|
|
47803
47809
|
this.CalculateTextSize=function(aryText, defaultFont, out)
|
|
@@ -47840,70 +47846,78 @@ function ChartLock()
|
|
|
47840
47846
|
return true;
|
|
47841
47847
|
}
|
|
47842
47848
|
|
|
47843
|
-
this.Draw=function(
|
|
47849
|
+
this.Draw=function(bDraw)
|
|
47844
47850
|
{
|
|
47845
47851
|
this.LockRect=null;
|
|
47852
|
+
if (!bDraw) return;
|
|
47846
47853
|
if (this.NotSupportMessage)
|
|
47847
47854
|
{
|
|
47848
47855
|
this.DrawNotSupportmessage();
|
|
47849
47856
|
return;
|
|
47850
47857
|
}
|
|
47851
47858
|
|
|
47852
|
-
|
|
47859
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
47860
|
+
var bMinute=this.IsMinuteFrame();
|
|
47861
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
47862
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
47863
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
47864
|
+
var border=this.ChartFrame.GetBorder();
|
|
47865
|
+
if (bHScreen)
|
|
47853
47866
|
{
|
|
47854
|
-
|
|
47855
|
-
|
|
47867
|
+
var chartright=border.BottomEx;
|
|
47868
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
47869
|
+
}
|
|
47870
|
+
else
|
|
47871
|
+
{
|
|
47872
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
47873
|
+
var chartright=border.RightEx;
|
|
47856
47874
|
}
|
|
47857
47875
|
|
|
47858
|
-
var
|
|
47859
|
-
var
|
|
47860
|
-
|
|
47861
|
-
if (this.ChartFrame.Data != null)
|
|
47876
|
+
var kData=this.ChartFrame.Data;
|
|
47877
|
+
var left=xOffset;
|
|
47878
|
+
if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
|
|
47862
47879
|
{
|
|
47863
|
-
var
|
|
47864
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
47865
|
-
xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+2.0;
|
|
47866
|
-
var chartright=this.ChartBorder.GetRight();
|
|
47867
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
47868
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
47880
|
+
for(var i=kData.DataOffset,j=0;i<kData.Data.length-this.LockCount && j<xPointCount-this.LockCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
47869
47881
|
{
|
|
47870
|
-
var
|
|
47871
|
-
if (
|
|
47882
|
+
var kItem=kData.Data[i];
|
|
47883
|
+
if (kItem.Open==null || kItem.High==null || kItem.Low==null || kItem.Close==null) continue;
|
|
47872
47884
|
|
|
47873
|
-
|
|
47874
|
-
|
|
47875
|
-
|
|
47885
|
+
if (bMinute)
|
|
47886
|
+
{
|
|
47887
|
+
left=this.ChartFrame.GetXFromIndex(j);
|
|
47888
|
+
}
|
|
47889
|
+
else
|
|
47890
|
+
{
|
|
47891
|
+
left=xOffset;
|
|
47892
|
+
var right=xOffset+dataWidth;
|
|
47893
|
+
if (right>chartright) break;
|
|
47894
|
+
}
|
|
47876
47895
|
}
|
|
47877
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
47878
47896
|
}
|
|
47879
|
-
|
|
47897
|
+
|
|
47898
|
+
if (bHScreen)
|
|
47880
47899
|
{
|
|
47881
|
-
|
|
47882
|
-
|
|
47883
|
-
|
|
47884
|
-
if (lLeft < this.ChartBorder.GetLeft())
|
|
47885
|
-
lLeft = this.ChartBorder.GetLeft();
|
|
47886
|
-
var lWidth = this.ChartBorder.GetRight() - lLeft;
|
|
47900
|
+
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
47901
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
47902
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
47887
47903
|
|
|
47888
|
-
|
|
47904
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
47905
|
+
this.Canvas.fillStyle =bgColor;
|
|
47906
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
47907
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
47908
|
+
}
|
|
47909
|
+
else
|
|
47889
47910
|
{
|
|
47890
|
-
|
|
47891
|
-
|
|
47892
|
-
|
|
47911
|
+
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
47912
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
47913
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
47914
|
+
//上下渐变
|
|
47915
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
47916
|
+
this.Canvas.fillStyle =bgColor;
|
|
47917
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
47918
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
47893
47919
|
}
|
|
47894
47920
|
|
|
47895
|
-
var rtBG={ Left:lLeft, Top:border.TopTitle, Bottom:border.Bottom, Width:lWidth };
|
|
47896
|
-
rtBG.Right=rtBG.Width+rtBG.Left;
|
|
47897
|
-
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
47898
|
-
this.LockRect=rtBG; //保存上锁区域
|
|
47899
|
-
|
|
47900
|
-
if (!isDraw) return;
|
|
47901
|
-
|
|
47902
|
-
//上下渐变
|
|
47903
|
-
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
47904
|
-
this.Canvas.fillStyle =bgColor;
|
|
47905
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
47906
|
-
|
|
47907
47921
|
var aryText=null;
|
|
47908
47922
|
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
47909
47923
|
else aryText=[{Text:this.Title}];
|
|
@@ -47911,85 +47925,57 @@ function ChartLock()
|
|
|
47911
47925
|
var outSize={ };
|
|
47912
47926
|
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
47913
47927
|
|
|
47914
|
-
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
47915
|
-
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
47916
|
-
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
47917
|
-
|
|
47918
47928
|
this.Canvas.textAlign='left';
|
|
47919
47929
|
this.Canvas.textBaseline='bottom';
|
|
47920
47930
|
this.Canvas.font = this.Font;
|
|
47921
|
-
|
|
47922
|
-
|
|
47931
|
+
|
|
47932
|
+
if (bHScreen)
|
|
47923
47933
|
{
|
|
47924
|
-
var
|
|
47925
|
-
if (
|
|
47926
|
-
|
|
47934
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Width)/2;
|
|
47935
|
+
if (outSize.Width>rtBG.Height) top=rtBG.Bottom-outSize.Width;
|
|
47936
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Height)/2;
|
|
47927
47937
|
|
|
47928
|
-
|
|
47929
|
-
this.Canvas.
|
|
47930
|
-
|
|
47931
|
-
|
|
47938
|
+
this.Canvas.save();
|
|
47939
|
+
this.Canvas.translate(left, top);
|
|
47940
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
47941
|
+
var yText=0,xText=0;
|
|
47942
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
47943
|
+
{
|
|
47944
|
+
var item=outSize.AryText[i];
|
|
47945
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
47946
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
47932
47947
|
|
|
47933
|
-
|
|
47934
|
-
|
|
47935
|
-
|
|
47948
|
+
yText+=item.Height;
|
|
47949
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
47950
|
+
}
|
|
47936
47951
|
|
|
47937
|
-
|
|
47938
|
-
|
|
47952
|
+
this.Canvas.restore();
|
|
47953
|
+
}
|
|
47954
|
+
else
|
|
47939
47955
|
{
|
|
47940
|
-
var
|
|
47941
|
-
|
|
47942
|
-
|
|
47943
|
-
|
|
47944
|
-
var
|
|
47945
|
-
|
|
47946
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
47956
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
47957
|
+
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
47958
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
47959
|
+
|
|
47960
|
+
var yText=top, xText=left;
|
|
47961
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
47947
47962
|
{
|
|
47948
|
-
var
|
|
47949
|
-
if (
|
|
47963
|
+
var item=outSize.AryText[i];
|
|
47964
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
47965
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
47950
47966
|
|
|
47951
|
-
|
|
47952
|
-
|
|
47953
|
-
|
|
47954
|
-
}
|
|
47955
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
47956
|
-
}
|
|
47957
|
-
if (lOffsetWidth == 0)
|
|
47958
|
-
{
|
|
47959
|
-
lOffsetWidth = (xOffset - this.ChartBorder.GetTop()) * this.WidthDiv;
|
|
47967
|
+
yText+=item.Height;
|
|
47968
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
47969
|
+
}
|
|
47960
47970
|
}
|
|
47961
|
-
|
|
47962
|
-
var lLeft = xOffset - lOffsetWidth;
|
|
47963
|
-
if (lLeft < this.ChartBorder.GetTop()) lLeft = this.ChartBorder.GetTop();
|
|
47964
|
-
var lHeight = this.ChartBorder.GetRight()-this.ChartBorder.GetLeft();
|
|
47965
|
-
var lWidth = this.ChartBorder.GetBottom() - lLeft;
|
|
47966
|
-
|
|
47967
|
-
this.Canvas.fillStyle = this.BGColor;
|
|
47968
|
-
this.Canvas.fillRect(this.ChartBorder.GetLeft(), lLeft,lHeight,lWidth);
|
|
47969
|
-
|
|
47970
|
-
var xCenter = this.ChartBorder.GetLeft() + lHeight / 2;
|
|
47971
|
-
var yCenter = lLeft + lWidth / 2;
|
|
47972
|
-
this.Canvas.save();
|
|
47973
|
-
this.Canvas.translate(xCenter, yCenter);
|
|
47974
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
47975
|
-
this.Canvas.textAlign = 'center';
|
|
47976
|
-
this.Canvas.textBaseline = 'middle';
|
|
47977
|
-
this.Canvas.fillStyle = this.TextColor;
|
|
47978
|
-
this.Canvas.font = this.Font;
|
|
47979
|
-
this.Canvas.fillText(this.Title, 0, 0);
|
|
47980
|
-
this.Canvas.restore();
|
|
47981
|
-
|
|
47982
|
-
this.LockRect={Left:this.ChartBorder.GetLeft(),Top:lLeft,Width:lHeight,Heigh:lWidth}; //保存上锁区域
|
|
47983
47971
|
}
|
|
47984
47972
|
|
|
47985
47973
|
//x,y是否在上锁区域
|
|
47986
47974
|
this.GetTooltipData=function(x,y,tooltip)
|
|
47987
47975
|
{
|
|
47988
|
-
if (this.LockRect
|
|
47976
|
+
if (!this.LockRect) return false;
|
|
47989
47977
|
|
|
47990
|
-
this.
|
|
47991
|
-
this.Canvas.rect(this.LockRect.Left,this.LockRect.Top,this.LockRect.Width,this.LockRect.Height);
|
|
47992
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
47978
|
+
if (Path2DHelper.PtInRect(x,y,this.LockRect))
|
|
47993
47979
|
{
|
|
47994
47980
|
tooltip.Data={ ID:this.LockID, Callback:this.Callback, IndexName:this.IndexName, IndexID:this.IndexID };
|
|
47995
47981
|
tooltip.ChartPaint=this;
|
|
@@ -58244,7 +58230,7 @@ function ChartCorssCursor()
|
|
|
58244
58230
|
|
|
58245
58231
|
this.Draw=function()
|
|
58246
58232
|
{
|
|
58247
|
-
this.Status=
|
|
58233
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
58248
58234
|
this.RightButton.Rect=null;
|
|
58249
58235
|
this.BottomButton.Rect=null;
|
|
58250
58236
|
this.LastValue=null;
|
|
@@ -58391,6 +58377,7 @@ function ChartCorssCursor()
|
|
|
58391
58377
|
}
|
|
58392
58378
|
}
|
|
58393
58379
|
|
|
58380
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
58394
58381
|
this.Canvas.stroke();
|
|
58395
58382
|
this.Canvas.restore();
|
|
58396
58383
|
|
|
@@ -58447,6 +58434,7 @@ function ChartCorssCursor()
|
|
|
58447
58434
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
58448
58435
|
}
|
|
58449
58436
|
|
|
58437
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
58450
58438
|
}
|
|
58451
58439
|
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
58452
58440
|
{
|
|
@@ -58454,6 +58442,8 @@ function ChartCorssCursor()
|
|
|
58454
58442
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
58455
58443
|
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
58456
58444
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
58445
|
+
|
|
58446
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
58457
58447
|
}
|
|
58458
58448
|
|
|
58459
58449
|
if (rtBG)
|
|
@@ -58463,6 +58453,7 @@ function ChartCorssCursor()
|
|
|
58463
58453
|
this.Canvas.textBaseline="bottom";
|
|
58464
58454
|
this.Canvas.fillStyle=this.TextColor;
|
|
58465
58455
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
58456
|
+
|
|
58466
58457
|
}
|
|
58467
58458
|
|
|
58468
58459
|
var complexText=
|
|
@@ -58584,6 +58575,8 @@ function ChartCorssCursor()
|
|
|
58584
58575
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
58585
58576
|
|
|
58586
58577
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
58578
|
+
|
|
58579
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
58587
58580
|
}
|
|
58588
58581
|
}
|
|
58589
58582
|
else if (this.ShowTextMode.Right==2) //框架内侧显示
|
|
@@ -58597,6 +58590,8 @@ function ChartCorssCursor()
|
|
|
58597
58590
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
58598
58591
|
|
|
58599
58592
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
58593
|
+
|
|
58594
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
58600
58595
|
}
|
|
58601
58596
|
}
|
|
58602
58597
|
|
|
@@ -58662,6 +58657,8 @@ function ChartCorssCursor()
|
|
|
58662
58657
|
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
58663
58658
|
this.BottomButton.Rect=rtBG;
|
|
58664
58659
|
this.BottomButton.Data=buttonData;
|
|
58660
|
+
|
|
58661
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
58665
58662
|
}
|
|
58666
58663
|
}
|
|
58667
58664
|
|
|
@@ -58710,8 +58707,6 @@ function ChartCorssCursor()
|
|
|
58710
58707
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
58711
58708
|
}
|
|
58712
58709
|
}
|
|
58713
|
-
|
|
58714
|
-
this.Status=1;
|
|
58715
58710
|
}
|
|
58716
58711
|
|
|
58717
58712
|
this.DrawComplexRightText=function(rtBG, complexText, size)
|
|
@@ -58999,6 +58994,7 @@ function ChartCorssCursor()
|
|
|
58999
58994
|
|
|
59000
58995
|
this.HScreenDraw=function()
|
|
59001
58996
|
{
|
|
58997
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
59002
58998
|
var x=this.LastPoint.X;
|
|
59003
58999
|
var y=this.LastPoint.Y;
|
|
59004
59000
|
|
|
@@ -59092,6 +59088,8 @@ function ChartCorssCursor()
|
|
|
59092
59088
|
}
|
|
59093
59089
|
}
|
|
59094
59090
|
|
|
59091
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
59092
|
+
|
|
59095
59093
|
this.Canvas.stroke();
|
|
59096
59094
|
this.Canvas.restore();
|
|
59097
59095
|
|
|
@@ -59152,6 +59150,8 @@ function ChartCorssCursor()
|
|
|
59152
59150
|
}
|
|
59153
59151
|
|
|
59154
59152
|
this.Canvas.restore();
|
|
59153
|
+
|
|
59154
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
59155
59155
|
}
|
|
59156
59156
|
else if (this.ShowTextMode.Left==2)
|
|
59157
59157
|
{
|
|
@@ -59169,6 +59169,8 @@ function ChartCorssCursor()
|
|
|
59169
59169
|
this.Canvas.fillText(text,2,0,textWidth);
|
|
59170
59170
|
|
|
59171
59171
|
this.Canvas.restore();
|
|
59172
|
+
|
|
59173
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
59172
59174
|
}
|
|
59173
59175
|
|
|
59174
59176
|
if (this.StringFormatY.RText)
|
|
@@ -59239,6 +59241,8 @@ function ChartCorssCursor()
|
|
|
59239
59241
|
}
|
|
59240
59242
|
|
|
59241
59243
|
this.Canvas.restore();
|
|
59244
|
+
|
|
59245
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
59242
59246
|
}
|
|
59243
59247
|
else if (this.ShowTextMode.Right==2)
|
|
59244
59248
|
{
|
|
@@ -59256,6 +59260,8 @@ function ChartCorssCursor()
|
|
|
59256
59260
|
this.Canvas.fillText(text,-2,0,textWidth);
|
|
59257
59261
|
|
|
59258
59262
|
this.Canvas.restore();
|
|
59263
|
+
|
|
59264
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
59259
59265
|
}
|
|
59260
59266
|
}
|
|
59261
59267
|
|
|
@@ -59329,10 +59335,10 @@ function ChartCorssCursor()
|
|
|
59329
59335
|
|
|
59330
59336
|
this.Canvas.restore();
|
|
59331
59337
|
}
|
|
59338
|
+
|
|
59339
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
59332
59340
|
}
|
|
59333
59341
|
}
|
|
59334
|
-
|
|
59335
|
-
this.Status=1;
|
|
59336
59342
|
}
|
|
59337
59343
|
|
|
59338
59344
|
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
@@ -59404,6 +59410,7 @@ function ChartCorssCursor()
|
|
|
59404
59410
|
}
|
|
59405
59411
|
|
|
59406
59412
|
|
|
59413
|
+
|
|
59407
59414
|
////////////////////////////////////////////////////////////////////////////////
|
|
59408
59415
|
//深度图十字光标
|
|
59409
59416
|
function DepthChartCorssCursor()
|
|
@@ -86589,6 +86596,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86589
86596
|
if (!item.Frame.LockPaint.GetTooltipData(x,y,tooltip)) continue;
|
|
86590
86597
|
|
|
86591
86598
|
tooltip.HQChart=this;
|
|
86599
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
86600
|
+
if (event && event.Callback)
|
|
86601
|
+
{
|
|
86602
|
+
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
86603
|
+
event.Callback(event,sendData,this);
|
|
86604
|
+
}
|
|
86605
|
+
|
|
86592
86606
|
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
86593
86607
|
return true;
|
|
86594
86608
|
}
|