hqchart 1.1.15091 → 1.1.15106
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/lib/umychart.vue.js +133 -106
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +5 -0
- package/src/jscommon/umychart.js +218 -389
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +221 -391
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +225 -390
|
@@ -6714,12 +6714,6 @@ JSChart.RegisterScriptIndexChart=function(name, option)
|
|
|
6714
6714
|
return g_ScriptIndexChartFactory.Add(name, option);
|
|
6715
6715
|
}
|
|
6716
6716
|
|
|
6717
|
-
//注册设置对话框类
|
|
6718
|
-
//option:{ Create:创建类方法 }
|
|
6719
|
-
JSChart.RegisterDialogClass=function(name, option)
|
|
6720
|
-
{
|
|
6721
|
-
return g_DialogFactory.Add(name, option);
|
|
6722
|
-
}
|
|
6723
6717
|
|
|
6724
6718
|
//注册框架类
|
|
6725
6719
|
JSChart.RegisterChartFrameClass=function(name, option)
|
|
@@ -6992,6 +6986,8 @@ var JSCHART_EVENT_ID=
|
|
|
6992
6986
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
6993
6987
|
|
|
6994
6988
|
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
6989
|
+
ON_CLICK_INDEX_LOCK:178, //点击指标锁
|
|
6990
|
+
ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
|
|
6995
6991
|
}
|
|
6996
6992
|
|
|
6997
6993
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7229,6 +7225,18 @@ var JSCHART_TRADE_STATUS_ID=
|
|
|
7229
7225
|
SUSP_ID:1, //停牌
|
|
7230
7226
|
}
|
|
7231
7227
|
|
|
7228
|
+
//十字光标状态
|
|
7229
|
+
var JSCHART_CORSSCURSOR_STATUS_ID=
|
|
7230
|
+
{
|
|
7231
|
+
NONE_ID:0,
|
|
7232
|
+
LINE_ID:1,
|
|
7233
|
+
LEFT_TEXT_ID:2,
|
|
7234
|
+
LEFT_INTER_TEXT_ID:4,
|
|
7235
|
+
RIGHT_TEXT_ID:8,
|
|
7236
|
+
RIGHT_INTER_TEXT_ID:16,
|
|
7237
|
+
BOTTOM_TEXT_ID:32,
|
|
7238
|
+
}
|
|
7239
|
+
|
|
7232
7240
|
|
|
7233
7241
|
function PhoneDBClick()
|
|
7234
7242
|
{
|
|
@@ -7445,6 +7453,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7445
7453
|
//锁十字光标
|
|
7446
7454
|
LockCorssCursor:{ X:{ Enable:false } },
|
|
7447
7455
|
|
|
7456
|
+
CorssCursorStatus:{ Value:null }, //十字光标状态 只读
|
|
7457
|
+
|
|
7448
7458
|
//图形中的单元选中状态
|
|
7449
7459
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
7450
7460
|
|
|
@@ -7611,6 +7621,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7611
7621
|
this.BuySellData.ArySell=null;
|
|
7612
7622
|
}
|
|
7613
7623
|
|
|
7624
|
+
this.UpdateCorssCursorStatus=function()
|
|
7625
|
+
{
|
|
7626
|
+
if (!this.ChartCorssCursor) return false;
|
|
7627
|
+
if (!this.GlobalOption || !this.GlobalOption.CorssCursorStatus) return false;
|
|
7628
|
+
|
|
7629
|
+
var status=this.ChartCorssCursor.Status;
|
|
7630
|
+
|
|
7631
|
+
//状态改变了
|
|
7632
|
+
if (this.GlobalOption.CorssCursorStatus.Value!=status)
|
|
7633
|
+
{
|
|
7634
|
+
this.GlobalOption.CorssCursorStatus.Value=status;
|
|
7635
|
+
|
|
7636
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CORSSCURSOR_STATUS_CHANGE);
|
|
7637
|
+
if (event && event.Callback)
|
|
7638
|
+
{
|
|
7639
|
+
var sendData={ Status:status, IsShowLine:(status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0 };
|
|
7640
|
+
event.Callback(event, sendData, this);
|
|
7641
|
+
}
|
|
7642
|
+
}
|
|
7643
|
+
|
|
7644
|
+
return true;
|
|
7645
|
+
}
|
|
7646
|
+
|
|
7614
7647
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
7615
7648
|
{
|
|
7616
7649
|
if (this.JSPopMenu) return;
|
|
@@ -10578,6 +10611,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10578
10611
|
this.Frame.ClearCoordinateText();
|
|
10579
10612
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
10580
10613
|
this.ChartSplashPaint.Draw();
|
|
10614
|
+
this.UpdateCorssCursorStatus();
|
|
10581
10615
|
return;
|
|
10582
10616
|
}
|
|
10583
10617
|
|
|
@@ -10870,6 +10904,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10870
10904
|
}
|
|
10871
10905
|
|
|
10872
10906
|
++this.TouchDrawCount;
|
|
10907
|
+
|
|
10908
|
+
this.UpdateCorssCursorStatus();
|
|
10873
10909
|
}
|
|
10874
10910
|
|
|
10875
10911
|
this.DrawExtendChartPaint=function(level, option)
|
|
@@ -11349,39 +11385,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11349
11385
|
exChartOption.Tooltip=option.Tooltip;
|
|
11350
11386
|
exChartOption.Point=option.Point;
|
|
11351
11387
|
}
|
|
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
11388
|
|
|
11389
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11390
|
+
|
|
11373
11391
|
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
|
-
|
|
11392
|
+
|
|
11385
11393
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
11386
11394
|
{
|
|
11387
11395
|
var item=this.ChartDrawPicture[i];
|
|
@@ -11407,15 +11415,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11407
11415
|
}
|
|
11408
11416
|
|
|
11409
11417
|
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
|
-
|
|
11418
|
+
|
|
11419
11419
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
11420
11420
|
{
|
|
11421
11421
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
@@ -11427,6 +11427,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11427
11427
|
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
11428
11428
|
|
|
11429
11429
|
++this.TouchDrawCount;
|
|
11430
|
+
|
|
11431
|
+
this.UpdateCorssCursorStatus();
|
|
11430
11432
|
}
|
|
11431
11433
|
|
|
11432
11434
|
this.DrawAnimation=function() //绘制动画 如弹幕
|
|
@@ -51882,7 +51884,6 @@ function ChartLock()
|
|
|
51882
51884
|
delete this.newMethod;
|
|
51883
51885
|
|
|
51884
51886
|
this.ClassName="ChartLock";
|
|
51885
|
-
this.WidthDiv = 0.2; // 框子宽度占比
|
|
51886
51887
|
this.LockCount = 20; // 锁最新的几个数据
|
|
51887
51888
|
this.BGColor = g_JSChartResource.IndexLock.BGColor;
|
|
51888
51889
|
this.TextColor = g_JSChartResource.IndexLock.TextColor;
|
|
@@ -51893,7 +51894,6 @@ function ChartLock()
|
|
|
51893
51894
|
this.Callback; //回调
|
|
51894
51895
|
this.IndexName; //指标名字
|
|
51895
51896
|
this.IndexID; //指标ID
|
|
51896
|
-
this.MinWidth=null; //最小宽度
|
|
51897
51897
|
|
|
51898
51898
|
|
|
51899
51899
|
this.CalculateTextSize=function(aryText, defaultFont, out)
|
|
@@ -51901,17 +51901,40 @@ function ChartLock()
|
|
|
51901
51901
|
if (!out || !IFrameSplitOperator.IsNonEmptyArray(aryText)) return false;
|
|
51902
51902
|
|
|
51903
51903
|
this.Canvas.font=defaultFont;
|
|
51904
|
-
var
|
|
51904
|
+
var defaultLineHeight=this.Canvas.measureText("擎").width; //行高
|
|
51905
|
+
var lineHeight=defaultLineHeight;
|
|
51905
51906
|
var height=0, width=0;
|
|
51906
51907
|
out.AryText=[];
|
|
51907
51908
|
for(var i=0;i<aryText.length;++i)
|
|
51908
51909
|
{
|
|
51909
51910
|
var item=aryText[i];
|
|
51910
|
-
if (!item || !item.Text) continue;
|
|
51911
|
-
|
|
51911
|
+
if (!item || (!item.Text && !item.Image)) continue;
|
|
51912
|
+
if (item.Image)
|
|
51913
|
+
{
|
|
51914
|
+
textWidth=item.Image.Width;
|
|
51915
|
+
lineHeight=item.Image.Height;
|
|
51916
|
+
}
|
|
51917
|
+
else
|
|
51918
|
+
{
|
|
51919
|
+
if (item.Font)
|
|
51920
|
+
{
|
|
51921
|
+
this.Canvas.font=item.Font;
|
|
51922
|
+
lineHeight=this.Canvas.measureText("擎").width;
|
|
51923
|
+
}
|
|
51924
|
+
else
|
|
51925
|
+
{
|
|
51926
|
+
this.Canvas.font=defaultFont;
|
|
51927
|
+
lineHeight=defaultLineHeight;
|
|
51928
|
+
}
|
|
51929
|
+
|
|
51930
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
51931
|
+
}
|
|
51912
51932
|
|
|
51913
51933
|
var lineItem={ Text:item.Text, Width:textWidth, Height:lineHeight, Color:item.Color, TextMargin:{ Top:0, Bottom:0, Left:0, Right:0 }, YOffset:0 };
|
|
51914
51934
|
if (IFrameSplitOperator.IsNumber(item.YOffset)) lineItem.YOffset=item.YOffset;
|
|
51935
|
+
if (item.Font) lineItem.Font=item.Font;
|
|
51936
|
+
if (IFrameSplitOperator.IsNumber(item.Align)) lineItem.Align=item.Align; //左右对齐 0=左 1=中 2=右
|
|
51937
|
+
if (item.Image) lineItem.Image=item.Image;
|
|
51915
51938
|
if (item.TextMargin)
|
|
51916
51939
|
{
|
|
51917
51940
|
var margin=item.TextMargin;
|
|
@@ -51936,70 +51959,78 @@ function ChartLock()
|
|
|
51936
51959
|
return true;
|
|
51937
51960
|
}
|
|
51938
51961
|
|
|
51939
|
-
this.Draw=function(
|
|
51962
|
+
this.Draw=function(bDraw)
|
|
51940
51963
|
{
|
|
51941
51964
|
this.LockRect=null;
|
|
51965
|
+
if (!bDraw) return;
|
|
51942
51966
|
if (this.NotSupportMessage)
|
|
51943
51967
|
{
|
|
51944
51968
|
this.DrawNotSupportmessage();
|
|
51945
51969
|
return;
|
|
51946
51970
|
}
|
|
51947
51971
|
|
|
51948
|
-
|
|
51972
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
51973
|
+
var bMinute=this.IsMinuteFrame();
|
|
51974
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
51975
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
51976
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
51977
|
+
var border=this.ChartFrame.GetBorder();
|
|
51978
|
+
if (bHScreen)
|
|
51949
51979
|
{
|
|
51950
|
-
|
|
51951
|
-
|
|
51980
|
+
var chartright=border.BottomEx;
|
|
51981
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
51982
|
+
}
|
|
51983
|
+
else
|
|
51984
|
+
{
|
|
51985
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
51986
|
+
var chartright=border.RightEx;
|
|
51952
51987
|
}
|
|
51953
51988
|
|
|
51954
|
-
var
|
|
51955
|
-
var
|
|
51956
|
-
|
|
51957
|
-
if (this.ChartFrame.Data != null)
|
|
51989
|
+
var kData=this.ChartFrame.Data;
|
|
51990
|
+
var left=xOffset;
|
|
51991
|
+
if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
|
|
51958
51992
|
{
|
|
51959
|
-
var
|
|
51960
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
51961
|
-
xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+2.0;
|
|
51962
|
-
var chartright=this.ChartBorder.GetRight();
|
|
51963
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
51964
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
51993
|
+
for(var i=kData.DataOffset,j=0;i<kData.Data.length-this.LockCount && j<xPointCount-this.LockCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
51965
51994
|
{
|
|
51966
|
-
var
|
|
51967
|
-
if (
|
|
51995
|
+
var kItem=kData.Data[i];
|
|
51996
|
+
if (kItem.Open==null || kItem.High==null || kItem.Low==null || kItem.Close==null) continue;
|
|
51968
51997
|
|
|
51969
|
-
|
|
51970
|
-
|
|
51971
|
-
|
|
51998
|
+
if (bMinute)
|
|
51999
|
+
{
|
|
52000
|
+
left=this.ChartFrame.GetXFromIndex(j);
|
|
52001
|
+
}
|
|
52002
|
+
else
|
|
52003
|
+
{
|
|
52004
|
+
left=xOffset;
|
|
52005
|
+
var right=xOffset+dataWidth;
|
|
52006
|
+
if (right>chartright) break;
|
|
52007
|
+
}
|
|
51972
52008
|
}
|
|
51973
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
51974
52009
|
}
|
|
51975
|
-
|
|
52010
|
+
|
|
52011
|
+
if (bHScreen)
|
|
51976
52012
|
{
|
|
51977
|
-
|
|
51978
|
-
|
|
51979
|
-
|
|
51980
|
-
if (lLeft < this.ChartBorder.GetLeft())
|
|
51981
|
-
lLeft = this.ChartBorder.GetLeft();
|
|
51982
|
-
var lWidth = this.ChartBorder.GetRight() - lLeft;
|
|
52013
|
+
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
52014
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52015
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
51983
52016
|
|
|
51984
|
-
|
|
52017
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
52018
|
+
this.Canvas.fillStyle =bgColor;
|
|
52019
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52020
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52021
|
+
}
|
|
52022
|
+
else
|
|
51985
52023
|
{
|
|
51986
|
-
|
|
51987
|
-
|
|
51988
|
-
|
|
52024
|
+
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
52025
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52026
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52027
|
+
//上下渐变
|
|
52028
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52029
|
+
this.Canvas.fillStyle =bgColor;
|
|
52030
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52031
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
51989
52032
|
}
|
|
51990
52033
|
|
|
51991
|
-
var rtBG={ Left:lLeft, Top:border.TopTitle, Bottom:border.Bottom, Width:lWidth };
|
|
51992
|
-
rtBG.Right=rtBG.Width+rtBG.Left;
|
|
51993
|
-
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
51994
|
-
this.LockRect=rtBG; //保存上锁区域
|
|
51995
|
-
|
|
51996
|
-
if (!isDraw) return;
|
|
51997
|
-
|
|
51998
|
-
//上下渐变
|
|
51999
|
-
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52000
|
-
this.Canvas.fillStyle =bgColor;
|
|
52001
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52002
|
-
|
|
52003
52034
|
var aryText=null;
|
|
52004
52035
|
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
52005
52036
|
else aryText=[{Text:this.Title}];
|
|
@@ -52007,85 +52038,84 @@ function ChartLock()
|
|
|
52007
52038
|
var outSize={ };
|
|
52008
52039
|
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
52009
52040
|
|
|
52010
|
-
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52011
|
-
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52012
|
-
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52013
|
-
|
|
52014
52041
|
this.Canvas.textAlign='left';
|
|
52015
52042
|
this.Canvas.textBaseline='bottom';
|
|
52016
52043
|
this.Canvas.font = this.Font;
|
|
52017
|
-
|
|
52018
|
-
|
|
52044
|
+
|
|
52045
|
+
if (bHScreen)
|
|
52019
52046
|
{
|
|
52020
|
-
var
|
|
52021
|
-
if (
|
|
52022
|
-
|
|
52047
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Width)/2;
|
|
52048
|
+
if (outSize.Width>rtBG.Height) top=rtBG.Bottom-outSize.Width;
|
|
52049
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Height)/2;
|
|
52023
52050
|
|
|
52024
|
-
|
|
52025
|
-
this.Canvas.
|
|
52026
|
-
|
|
52027
|
-
|
|
52051
|
+
this.Canvas.save();
|
|
52052
|
+
this.Canvas.translate(left, top);
|
|
52053
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52054
|
+
var yText=0,xText=0;
|
|
52055
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52056
|
+
{
|
|
52057
|
+
var item=outSize.AryText[i];
|
|
52058
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52059
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52028
52060
|
|
|
52029
|
-
|
|
52030
|
-
|
|
52031
|
-
var xOffset = this.ChartBorder.GetBottom();
|
|
52061
|
+
if (item.Font) this.Canvas.font = item.Font;
|
|
52062
|
+
else this.Canvas.font = this.Font;
|
|
52032
52063
|
|
|
52033
|
-
|
|
52034
|
-
|
|
52035
|
-
|
|
52036
|
-
var dataWidth=this.ChartFrame.DataWidth;
|
|
52037
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
52038
|
-
xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+2.0;
|
|
52039
|
-
var chartright=this.ChartBorder.GetBottom();
|
|
52040
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
52041
|
-
//求最后1个数据的位置
|
|
52042
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52043
|
-
{
|
|
52044
|
-
var data=this.ChartFrame.Data.Data[i];
|
|
52045
|
-
if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
52064
|
+
yText+=item.Height;
|
|
52065
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52066
|
+
}
|
|
52046
52067
|
|
|
52047
|
-
|
|
52048
|
-
var right=xOffset+dataWidth;
|
|
52049
|
-
if (right>chartright) break;
|
|
52050
|
-
}
|
|
52051
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52068
|
+
this.Canvas.restore();
|
|
52052
52069
|
}
|
|
52053
|
-
|
|
52070
|
+
else
|
|
52054
52071
|
{
|
|
52055
|
-
|
|
52056
|
-
|
|
52072
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52073
|
+
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52074
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52075
|
+
|
|
52076
|
+
var yText=top, xText=left;
|
|
52077
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52078
|
+
{
|
|
52079
|
+
var item=outSize.AryText[i];
|
|
52080
|
+
if (item.Image)
|
|
52081
|
+
{
|
|
52082
|
+
xText=left;
|
|
52083
|
+
if (item.Align===1)
|
|
52084
|
+
{
|
|
52085
|
+
if (outSize.Width>item.Width) xText+=(outSize.Width-item.Width)/2;
|
|
52086
|
+
}
|
|
52057
52087
|
|
|
52058
|
-
|
|
52059
|
-
if (lLeft < this.ChartBorder.GetTop()) lLeft = this.ChartBorder.GetTop();
|
|
52060
|
-
var lHeight = this.ChartBorder.GetRight()-this.ChartBorder.GetLeft();
|
|
52061
|
-
var lWidth = this.ChartBorder.GetBottom() - lLeft;
|
|
52088
|
+
this.Canvas.drawImage(item.Image.Data, xText, yText, item.Image.Width, item.Image.Height);
|
|
52062
52089
|
|
|
52063
|
-
|
|
52064
|
-
|
|
52090
|
+
yText+=item.Height;
|
|
52091
|
+
}
|
|
52092
|
+
else
|
|
52093
|
+
{
|
|
52094
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52095
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52065
52096
|
|
|
52066
|
-
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
this.Canvas.fillText(this.Title, 0, 0);
|
|
52076
|
-
this.Canvas.restore();
|
|
52097
|
+
if (item.Font) this.Canvas.font = item.Font;
|
|
52098
|
+
else this.Canvas.font = this.Font;
|
|
52099
|
+
|
|
52100
|
+
yText+=item.Height;
|
|
52101
|
+
xText=left;
|
|
52102
|
+
if (item.Align===1)
|
|
52103
|
+
{
|
|
52104
|
+
if (outSize.Width>item.Width) xText+=(outSize.Width-item.Width)/2;
|
|
52105
|
+
}
|
|
52077
52106
|
|
|
52078
|
-
|
|
52107
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52108
|
+
}
|
|
52109
|
+
}
|
|
52110
|
+
}
|
|
52079
52111
|
}
|
|
52080
52112
|
|
|
52081
52113
|
//x,y是否在上锁区域
|
|
52082
52114
|
this.GetTooltipData=function(x,y,tooltip)
|
|
52083
52115
|
{
|
|
52084
|
-
if (this.LockRect
|
|
52116
|
+
if (!this.LockRect) return false;
|
|
52085
52117
|
|
|
52086
|
-
this.
|
|
52087
|
-
this.Canvas.rect(this.LockRect.Left,this.LockRect.Top,this.LockRect.Width,this.LockRect.Height);
|
|
52088
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
52118
|
+
if (Path2DHelper.PtInRect(x,y,this.LockRect))
|
|
52089
52119
|
{
|
|
52090
52120
|
tooltip.Data={ ID:this.LockID, Callback:this.Callback, IndexName:this.IndexName, IndexID:this.IndexID };
|
|
52091
52121
|
tooltip.ChartPaint=this;
|
|
@@ -62340,7 +62370,7 @@ function ChartCorssCursor()
|
|
|
62340
62370
|
|
|
62341
62371
|
this.Draw=function()
|
|
62342
62372
|
{
|
|
62343
|
-
this.Status=
|
|
62373
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
62344
62374
|
this.RightButton.Rect=null;
|
|
62345
62375
|
this.BottomButton.Rect=null;
|
|
62346
62376
|
this.LastValue=null;
|
|
@@ -62487,6 +62517,7 @@ function ChartCorssCursor()
|
|
|
62487
62517
|
}
|
|
62488
62518
|
}
|
|
62489
62519
|
|
|
62520
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
62490
62521
|
this.Canvas.stroke();
|
|
62491
62522
|
this.Canvas.restore();
|
|
62492
62523
|
|
|
@@ -62543,6 +62574,7 @@ function ChartCorssCursor()
|
|
|
62543
62574
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62544
62575
|
}
|
|
62545
62576
|
|
|
62577
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
62546
62578
|
}
|
|
62547
62579
|
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
62548
62580
|
{
|
|
@@ -62550,6 +62582,8 @@ function ChartCorssCursor()
|
|
|
62550
62582
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62551
62583
|
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
62552
62584
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
62585
|
+
|
|
62586
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
62553
62587
|
}
|
|
62554
62588
|
|
|
62555
62589
|
if (rtBG)
|
|
@@ -62559,6 +62593,7 @@ function ChartCorssCursor()
|
|
|
62559
62593
|
this.Canvas.textBaseline="bottom";
|
|
62560
62594
|
this.Canvas.fillStyle=this.TextColor;
|
|
62561
62595
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62596
|
+
|
|
62562
62597
|
}
|
|
62563
62598
|
|
|
62564
62599
|
var complexText=
|
|
@@ -62680,6 +62715,8 @@ function ChartCorssCursor()
|
|
|
62680
62715
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62681
62716
|
|
|
62682
62717
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62718
|
+
|
|
62719
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
62683
62720
|
}
|
|
62684
62721
|
}
|
|
62685
62722
|
else if (this.ShowTextMode.Right==2) //框架内侧显示
|
|
@@ -62693,6 +62730,8 @@ function ChartCorssCursor()
|
|
|
62693
62730
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62694
62731
|
|
|
62695
62732
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62733
|
+
|
|
62734
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
62696
62735
|
}
|
|
62697
62736
|
}
|
|
62698
62737
|
|
|
@@ -62758,6 +62797,8 @@ function ChartCorssCursor()
|
|
|
62758
62797
|
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
62759
62798
|
this.BottomButton.Rect=rtBG;
|
|
62760
62799
|
this.BottomButton.Data=buttonData;
|
|
62800
|
+
|
|
62801
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
62761
62802
|
}
|
|
62762
62803
|
}
|
|
62763
62804
|
|
|
@@ -62806,8 +62847,6 @@ function ChartCorssCursor()
|
|
|
62806
62847
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62807
62848
|
}
|
|
62808
62849
|
}
|
|
62809
|
-
|
|
62810
|
-
this.Status=1;
|
|
62811
62850
|
}
|
|
62812
62851
|
|
|
62813
62852
|
this.DrawComplexRightText=function(rtBG, complexText, size)
|
|
@@ -63095,6 +63134,7 @@ function ChartCorssCursor()
|
|
|
63095
63134
|
|
|
63096
63135
|
this.HScreenDraw=function()
|
|
63097
63136
|
{
|
|
63137
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
63098
63138
|
var x=this.LastPoint.X;
|
|
63099
63139
|
var y=this.LastPoint.Y;
|
|
63100
63140
|
|
|
@@ -63188,6 +63228,8 @@ function ChartCorssCursor()
|
|
|
63188
63228
|
}
|
|
63189
63229
|
}
|
|
63190
63230
|
|
|
63231
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
63232
|
+
|
|
63191
63233
|
this.Canvas.stroke();
|
|
63192
63234
|
this.Canvas.restore();
|
|
63193
63235
|
|
|
@@ -63248,6 +63290,8 @@ function ChartCorssCursor()
|
|
|
63248
63290
|
}
|
|
63249
63291
|
|
|
63250
63292
|
this.Canvas.restore();
|
|
63293
|
+
|
|
63294
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
63251
63295
|
}
|
|
63252
63296
|
else if (this.ShowTextMode.Left==2)
|
|
63253
63297
|
{
|
|
@@ -63265,6 +63309,8 @@ function ChartCorssCursor()
|
|
|
63265
63309
|
this.Canvas.fillText(text,2,0,textWidth);
|
|
63266
63310
|
|
|
63267
63311
|
this.Canvas.restore();
|
|
63312
|
+
|
|
63313
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
63268
63314
|
}
|
|
63269
63315
|
|
|
63270
63316
|
if (this.StringFormatY.RText)
|
|
@@ -63335,6 +63381,8 @@ function ChartCorssCursor()
|
|
|
63335
63381
|
}
|
|
63336
63382
|
|
|
63337
63383
|
this.Canvas.restore();
|
|
63384
|
+
|
|
63385
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
63338
63386
|
}
|
|
63339
63387
|
else if (this.ShowTextMode.Right==2)
|
|
63340
63388
|
{
|
|
@@ -63352,6 +63400,8 @@ function ChartCorssCursor()
|
|
|
63352
63400
|
this.Canvas.fillText(text,-2,0,textWidth);
|
|
63353
63401
|
|
|
63354
63402
|
this.Canvas.restore();
|
|
63403
|
+
|
|
63404
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
63355
63405
|
}
|
|
63356
63406
|
}
|
|
63357
63407
|
|
|
@@ -63425,10 +63475,10 @@ function ChartCorssCursor()
|
|
|
63425
63475
|
|
|
63426
63476
|
this.Canvas.restore();
|
|
63427
63477
|
}
|
|
63478
|
+
|
|
63479
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
63428
63480
|
}
|
|
63429
63481
|
}
|
|
63430
|
-
|
|
63431
|
-
this.Status=1;
|
|
63432
63482
|
}
|
|
63433
63483
|
|
|
63434
63484
|
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
@@ -63500,6 +63550,7 @@ function ChartCorssCursor()
|
|
|
63500
63550
|
}
|
|
63501
63551
|
|
|
63502
63552
|
|
|
63553
|
+
|
|
63503
63554
|
////////////////////////////////////////////////////////////////////////////////
|
|
63504
63555
|
//深度图十字光标
|
|
63505
63556
|
function DepthChartCorssCursor()
|
|
@@ -90685,6 +90736,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90685
90736
|
if (!item.Frame.LockPaint.GetTooltipData(x,y,tooltip)) continue;
|
|
90686
90737
|
|
|
90687
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
|
+
|
|
90688
90746
|
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
90689
90747
|
return true;
|
|
90690
90748
|
}
|
|
@@ -105045,239 +105103,9 @@ function IsFundSymbol(symbol)
|
|
|
105045
105103
|
return false;
|
|
105046
105104
|
}
|
|
105047
105105
|
|
|
105048
|
-
//设置对话框工厂类
|
|
105049
|
-
function DialogFactory()
|
|
105050
|
-
{
|
|
105051
|
-
//[key:name, { Create:function(divElement) { return new class(divElement); }} ]
|
|
105052
|
-
this.DataMap=new Map(
|
|
105053
|
-
[
|
|
105054
|
-
["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
|
|
105055
|
-
]);
|
|
105056
|
-
|
|
105057
|
-
this.Create=function(name, option)
|
|
105058
|
-
{
|
|
105059
|
-
if (!this.DataMap.has(name))
|
|
105060
|
-
{
|
|
105061
|
-
JSConsole.Chart.Warn(`[DialogFactory::Create] can't find class=${name}.`);
|
|
105062
|
-
return null;
|
|
105063
|
-
}
|
|
105064
|
-
|
|
105065
|
-
var item=this.DataMap.get(name);
|
|
105066
|
-
return item.Create(option);
|
|
105067
|
-
}
|
|
105068
|
-
|
|
105069
|
-
this.Add=function(name, option)
|
|
105070
|
-
{
|
|
105071
|
-
this.DataMap.set(name, { Create:option.Create } );
|
|
105072
|
-
}
|
|
105073
|
-
}
|
|
105074
|
-
|
|
105075
|
-
var g_DialogFactory=new DialogFactory();
|
|
105076
|
-
|
|
105077
|
-
//设置窗口基类
|
|
105078
|
-
function IDivDialog(divElement)
|
|
105079
|
-
{
|
|
105080
|
-
this.DivElement=divElement; //父节点
|
|
105081
|
-
this.ID=null; //div id
|
|
105082
|
-
this.TimeOut=null; //定时器
|
|
105083
|
-
|
|
105084
|
-
//隐藏窗口
|
|
105085
|
-
this.Hide=function()
|
|
105086
|
-
{
|
|
105087
|
-
$("#"+this.ID).hide();
|
|
105088
|
-
}
|
|
105089
|
-
|
|
105090
|
-
//显示窗口
|
|
105091
|
-
this.Show=function(left,top,width,height)
|
|
105092
|
-
{
|
|
105093
|
-
var cssData={display:'block'};
|
|
105094
|
-
if (IFrameSplitOperator.IsNumber(left)) cssData.left=left+'px';
|
|
105095
|
-
if (IFrameSplitOperator.IsNumber(top)) cssData.top=top+'px';
|
|
105096
|
-
if (IFrameSplitOperator.IsNumber(width)) cssData.width=width+'px';
|
|
105097
|
-
if (IFrameSplitOperator.IsNumber(height)) cssData.height=height+'px';
|
|
105098
|
-
|
|
105099
|
-
$("#"+this.ID).css(cssData);
|
|
105100
|
-
}
|
|
105101
|
-
}
|
|
105102
|
-
|
|
105103
|
-
//等待动画窗口
|
|
105104
|
-
function WaitDialog(divElement)
|
|
105105
|
-
{
|
|
105106
|
-
this.newMethod=IDivDialog; //派生
|
|
105107
|
-
this.newMethod(divElement);
|
|
105108
|
-
delete this.newMethod;
|
|
105109
|
-
|
|
105110
|
-
this.Title='加载中......';
|
|
105111
|
-
this.Dialog;
|
|
105112
|
-
|
|
105113
|
-
//隐藏窗口
|
|
105114
|
-
this.Close=function()
|
|
105115
|
-
{
|
|
105116
|
-
if (this.Dialog)
|
|
105117
|
-
{
|
|
105118
|
-
this.DivElement.removeChild(this.Dialog);
|
|
105119
|
-
this.Dialog=null;
|
|
105120
|
-
}
|
|
105121
|
-
}
|
|
105122
|
-
|
|
105123
|
-
this.SetTitle=function(title)
|
|
105124
|
-
{
|
|
105125
|
-
this.Title=title;
|
|
105126
|
-
if (!this.Dialog) return;
|
|
105127
|
-
//TODO: 更新标题数据
|
|
105128
|
-
}
|
|
105129
|
-
|
|
105130
|
-
this.Create=function()
|
|
105131
|
-
{
|
|
105132
|
-
this.ID=Guid();
|
|
105133
|
-
var div=document.createElement('div');
|
|
105134
|
-
div.className='jchart-wait-box';
|
|
105135
|
-
div.id=this.ID;
|
|
105136
|
-
div.innerHTML=
|
|
105137
|
-
`<div class='parameter jchart-kline-match-box'>
|
|
105138
|
-
<div class='parameter-header'>
|
|
105139
|
-
<span>${this.Title}</span>
|
|
105140
|
-
</div>
|
|
105141
|
-
</div>`.trim();
|
|
105142
|
-
|
|
105143
|
-
this.DivElement.appendChild(div);
|
|
105144
|
-
this.Dialog=div;
|
|
105145
|
-
}
|
|
105146
|
-
|
|
105147
|
-
//显示
|
|
105148
|
-
this.DoModal=function(event)
|
|
105149
|
-
{
|
|
105150
|
-
this.Title=event.data.Title;
|
|
105151
|
-
var chart=event.data.Chart;
|
|
105152
|
-
if (this.ID==null) this.Create(); //第1次 需要创建div
|
|
105153
|
-
|
|
105154
|
-
//居中显示
|
|
105155
|
-
var border=chart.Frame.ChartBorder;
|
|
105156
|
-
var scrollPos=GetScrollPosition();
|
|
105157
|
-
var left=border.GetWidth()/2;
|
|
105158
|
-
var top=border.GetHeight()/2;
|
|
105159
|
-
|
|
105160
|
-
this.Show(left,top,200,40); //显示
|
|
105161
|
-
}
|
|
105162
|
-
}
|
|
105163
|
-
|
|
105164
|
-
//画图工具 单个图形设置
|
|
105165
|
-
function ChartPictureSettingMenu(divElement)
|
|
105166
|
-
{
|
|
105167
|
-
this.newMethod=IDivDialog; //派生
|
|
105168
|
-
this.newMethod(divElement);
|
|
105169
|
-
delete this.newMethod;
|
|
105170
|
-
|
|
105171
|
-
this.HQChart;
|
|
105172
|
-
this.ChartPicture;
|
|
105173
|
-
this.SubToolsDiv;
|
|
105174
|
-
this.SettingMenu;
|
|
105175
|
-
this.SettingPV;
|
|
105176
|
-
|
|
105177
|
-
this.DoModal=function(event)
|
|
105178
|
-
{
|
|
105179
|
-
var $body;
|
|
105180
|
-
if (!this.SubToolsDiv)
|
|
105181
|
-
{
|
|
105182
|
-
this.ID=Guid();
|
|
105183
|
-
var div=document.createElement("div");
|
|
105184
|
-
div.className='subTolls';
|
|
105185
|
-
div.id=this.ID;
|
|
105186
|
-
this.DivElement.appendChild(div);
|
|
105187
|
-
//$body = $("."+event.data.HQChart.ClassName).context.body;
|
|
105188
|
-
//$body.append(div);
|
|
105189
|
-
this.SubToolsDiv=div;
|
|
105190
|
-
}
|
|
105191
|
-
this.HQChart=event.data.HQChart;
|
|
105192
|
-
this.ChartPicture=event.data.ChartPicture;
|
|
105193
|
-
|
|
105194
|
-
var pixelTatio = GetDevicePixelRatio();
|
|
105195
|
-
var frame=this.HQChart.Frame.SubFrame[0].Frame;
|
|
105196
|
-
// var top=frame.ChartBorder.GetTopTitle();
|
|
105197
|
-
var top=frame.ChartBorder.Top + 40;
|
|
105198
|
-
// var right=frame.ChartBorder.GetRight();
|
|
105199
|
-
var right=frame.ChartBorder.Right;
|
|
105200
|
-
var left=frame.ChartBorder.GetLeft();
|
|
105201
|
-
var className = this.ChartPicture.ClassName; //='ChartDrawPictureText'时加“设置”
|
|
105202
|
-
var lineColor=this.ChartPicture.LineColor;
|
|
105203
|
-
if (lineColor.indexOf("rgb(")==0 || lineColor.indexOf("RGB(")==0)
|
|
105204
|
-
lineColor=IChartDrawPicture.RGBToHex(lineColor.toLowerCase());
|
|
105205
|
-
var toolsDiv = "";
|
|
105206
|
-
if(className === 'ChartDrawPictureText')
|
|
105207
|
-
{
|
|
105208
|
-
toolsDiv = '<span class="changes-color" title="改变图形颜色">'+
|
|
105209
|
-
'<i class="iconfont icon-bianji"></i>'+
|
|
105210
|
-
'<input type="color" name="color" id="color" class="change-color" value="'+ lineColor +'">'+
|
|
105211
|
-
'</span>\n' +
|
|
105212
|
-
'<span class="subtool-set" title="设置"><i class="iconfont icon-shezhi"></i></span>'+
|
|
105213
|
-
'<span class="subtool-del"><i class="iconfont icon-recycle_bin"></i></span>';
|
|
105214
|
-
}
|
|
105215
|
-
else if (className=="ChartDrawVolProfile")
|
|
105216
|
-
{
|
|
105217
|
-
toolsDiv='<span class="vp-set" title="设置"><i class="iconfont icon-shezhi"></i></span>'+
|
|
105218
|
-
'<span class="subtool-del"><i class="iconfont icon-recycle_bin"></i></span>';
|
|
105219
|
-
}
|
|
105220
|
-
else
|
|
105221
|
-
{
|
|
105222
|
-
toolsDiv =
|
|
105223
|
-
'<p class="changes-color" title="改变图形颜色"><i class="iconfont icon-bianji"></i>' +
|
|
105224
|
-
'<input type="color" name="color" id="color" class="change-color" value="'+ lineColor +'"></p>\n' +
|
|
105225
|
-
' <p class="subtool-del"><i class="iconfont icon-recycle_bin"></i></p>';
|
|
105226
|
-
}
|
|
105227
|
-
|
|
105228
|
-
|
|
105229
|
-
this.SubToolsDiv.style.right = right/pixelTatio + "px";
|
|
105230
|
-
this.SubToolsDiv.style.top = top/pixelTatio + "px";
|
|
105231
|
-
this.SubToolsDiv.innerHTML = toolsDiv;
|
|
105232
|
-
this.SubToolsDiv.style.position = "absolute";
|
|
105233
|
-
this.SubToolsDiv.style.display = "block";
|
|
105234
|
-
|
|
105235
|
-
var hqChart = this.HQChart;
|
|
105236
|
-
var picture = this.ChartPicture;
|
|
105237
|
-
var subToolDiv = this.SubToolsDiv;
|
|
105238
|
-
$(".subtool-del").click(function(){
|
|
105239
|
-
hqChart.SelectChartDrawPicture=null;
|
|
105240
|
-
hqChart.ClearChartDrawPicture(picture);
|
|
105241
|
-
// subToolDiv.innerHTML = "";
|
|
105242
|
-
$(".subTolls").css("display","none");
|
|
105243
|
-
});
|
|
105244
|
-
var self = this;
|
|
105245
|
-
$(".subtool-set").click(function(){
|
|
105246
|
-
$(self.SubToolsDiv).hide();
|
|
105247
|
-
//创建div设置窗口
|
|
105248
|
-
if (!self.SettingMenu) self.SettingMenu=new ChartPictureTextSettingMenu(frame.ChartBorder.UIElement.parentNode);
|
|
105249
|
-
|
|
105250
|
-
self.SettingMenu.ChartPicture=picture;
|
|
105251
|
-
self.SettingMenu.HQChart=hqChart;
|
|
105252
|
-
self.SettingMenu.Position={Left:right + 80,Top:top + 20};
|
|
105253
|
-
self.SettingMenu.DoModal();
|
|
105254
|
-
});
|
|
105255
|
-
$(".changes-color").click(function () {
|
|
105256
|
-
document.getElementById('color').click();
|
|
105257
|
-
$(".change-color").change(function () {
|
|
105258
|
-
var color = $(".change-color").val();
|
|
105259
|
-
picture.LineColor = color;
|
|
105260
|
-
picture.PointColor = color;
|
|
105261
|
-
if (hqChart.ChartDrawStorage) hqChart.ChartDrawStorage.SaveDrawData(picture); //保存下
|
|
105262
|
-
});
|
|
105263
|
-
});
|
|
105264
|
-
|
|
105265
|
-
//成交量分布图设置
|
|
105266
|
-
$(".vp-set").click(function()
|
|
105267
|
-
{
|
|
105268
|
-
if (!self.SettingPV) self.SettingPV=new ChartPictureVolProfileSettingMenu(frame.ChartBorder.UIElement.parentNode);
|
|
105269
|
-
self.SettingPV.ChartPicture=picture;
|
|
105270
|
-
self.SettingPV.HQChart=hqChart;
|
|
105271
|
-
self.SettingPV.Position={Left:right + 80,Top:top + 20};
|
|
105272
|
-
self.SettingPV.DoModal();
|
|
105273
|
-
});
|
|
105274
|
-
|
|
105275
|
-
|
|
105276
|
-
JSConsole.Chart.Log("[ChartPictureSettingMenu::DoModal]", {Top:top,Left:left, Right:right});
|
|
105277
|
-
}
|
|
105278
|
-
}
|
|
105279
105106
|
|
|
105280
105107
|
|
|
105108
|
+
/*
|
|
105281
105109
|
function ChartPictureVolProfileSettingMenu(divElement)
|
|
105282
105110
|
{
|
|
105283
105111
|
this.newMethod=IDivDialog; //派生
|
|
@@ -105366,6 +105194,7 @@ function ChartPictureVolProfileSettingMenu(divElement)
|
|
|
105366
105194
|
}
|
|
105367
105195
|
}
|
|
105368
105196
|
}
|
|
105197
|
+
*/
|
|
105369
105198
|
|
|
105370
105199
|
|
|
105371
105200
|
|
|
@@ -153888,7 +153717,7 @@ function ScrollBarBGChart()
|
|
|
153888
153717
|
|
|
153889
153718
|
|
|
153890
153719
|
|
|
153891
|
-
var HQCHART_VERSION="1.1.
|
|
153720
|
+
var HQCHART_VERSION="1.1.15105";
|
|
153892
153721
|
|
|
153893
153722
|
function PrintHQChartVersion()
|
|
153894
153723
|
{
|
|
@@ -154042,7 +153871,8 @@ export default {
|
|
|
154042
153871
|
JSCHART_DATA_FIELD_ID:JSCHART_DATA_FIELD_ID,
|
|
154043
153872
|
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
154044
153873
|
JSCHART_MENU_ID:JSCHART_MENU_ID,
|
|
154045
|
-
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID,
|
|
153874
|
+
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
|
|
153875
|
+
JSCHART_CORSSCURSOR_STATUS_ID:JSCHART_CORSSCURSOR_STATUS_ID, //十字光标状态
|
|
154046
153876
|
},
|
|
154047
153877
|
}
|
|
154048
153878
|
|