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
|
@@ -6758,12 +6758,6 @@ JSChart.RegisterScriptIndexChart=function(name, option)
|
|
|
6758
6758
|
return g_ScriptIndexChartFactory.Add(name, option);
|
|
6759
6759
|
}
|
|
6760
6760
|
|
|
6761
|
-
//注册设置对话框类
|
|
6762
|
-
//option:{ Create:创建类方法 }
|
|
6763
|
-
JSChart.RegisterDialogClass=function(name, option)
|
|
6764
|
-
{
|
|
6765
|
-
return g_DialogFactory.Add(name, option);
|
|
6766
|
-
}
|
|
6767
6761
|
|
|
6768
6762
|
//注册框架类
|
|
6769
6763
|
JSChart.RegisterChartFrameClass=function(name, option)
|
|
@@ -7036,6 +7030,8 @@ var JSCHART_EVENT_ID=
|
|
|
7036
7030
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
7037
7031
|
|
|
7038
7032
|
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
7033
|
+
ON_CLICK_INDEX_LOCK:178, //点击指标锁
|
|
7034
|
+
ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
|
|
7039
7035
|
}
|
|
7040
7036
|
|
|
7041
7037
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7273,6 +7269,18 @@ var JSCHART_TRADE_STATUS_ID=
|
|
|
7273
7269
|
SUSP_ID:1, //停牌
|
|
7274
7270
|
}
|
|
7275
7271
|
|
|
7272
|
+
//十字光标状态
|
|
7273
|
+
var JSCHART_CORSSCURSOR_STATUS_ID=
|
|
7274
|
+
{
|
|
7275
|
+
NONE_ID:0,
|
|
7276
|
+
LINE_ID:1,
|
|
7277
|
+
LEFT_TEXT_ID:2,
|
|
7278
|
+
LEFT_INTER_TEXT_ID:4,
|
|
7279
|
+
RIGHT_TEXT_ID:8,
|
|
7280
|
+
RIGHT_INTER_TEXT_ID:16,
|
|
7281
|
+
BOTTOM_TEXT_ID:32,
|
|
7282
|
+
}
|
|
7283
|
+
|
|
7276
7284
|
|
|
7277
7285
|
function PhoneDBClick()
|
|
7278
7286
|
{
|
|
@@ -7489,6 +7497,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7489
7497
|
//锁十字光标
|
|
7490
7498
|
LockCorssCursor:{ X:{ Enable:false } },
|
|
7491
7499
|
|
|
7500
|
+
CorssCursorStatus:{ Value:null }, //十字光标状态 只读
|
|
7501
|
+
|
|
7492
7502
|
//图形中的单元选中状态
|
|
7493
7503
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
7494
7504
|
|
|
@@ -7655,6 +7665,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7655
7665
|
this.BuySellData.ArySell=null;
|
|
7656
7666
|
}
|
|
7657
7667
|
|
|
7668
|
+
this.UpdateCorssCursorStatus=function()
|
|
7669
|
+
{
|
|
7670
|
+
if (!this.ChartCorssCursor) return false;
|
|
7671
|
+
if (!this.GlobalOption || !this.GlobalOption.CorssCursorStatus) return false;
|
|
7672
|
+
|
|
7673
|
+
var status=this.ChartCorssCursor.Status;
|
|
7674
|
+
|
|
7675
|
+
//状态改变了
|
|
7676
|
+
if (this.GlobalOption.CorssCursorStatus.Value!=status)
|
|
7677
|
+
{
|
|
7678
|
+
this.GlobalOption.CorssCursorStatus.Value=status;
|
|
7679
|
+
|
|
7680
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CORSSCURSOR_STATUS_CHANGE);
|
|
7681
|
+
if (event && event.Callback)
|
|
7682
|
+
{
|
|
7683
|
+
var sendData={ Status:status, IsShowLine:(status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0 };
|
|
7684
|
+
event.Callback(event, sendData, this);
|
|
7685
|
+
}
|
|
7686
|
+
}
|
|
7687
|
+
|
|
7688
|
+
return true;
|
|
7689
|
+
}
|
|
7690
|
+
|
|
7658
7691
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
7659
7692
|
{
|
|
7660
7693
|
if (this.JSPopMenu) return;
|
|
@@ -10622,6 +10655,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10622
10655
|
this.Frame.ClearCoordinateText();
|
|
10623
10656
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
10624
10657
|
this.ChartSplashPaint.Draw();
|
|
10658
|
+
this.UpdateCorssCursorStatus();
|
|
10625
10659
|
return;
|
|
10626
10660
|
}
|
|
10627
10661
|
|
|
@@ -10914,6 +10948,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10914
10948
|
}
|
|
10915
10949
|
|
|
10916
10950
|
++this.TouchDrawCount;
|
|
10951
|
+
|
|
10952
|
+
this.UpdateCorssCursorStatus();
|
|
10917
10953
|
}
|
|
10918
10954
|
|
|
10919
10955
|
this.DrawExtendChartPaint=function(level, option)
|
|
@@ -11393,39 +11429,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11393
11429
|
exChartOption.Tooltip=option.Tooltip;
|
|
11394
11430
|
exChartOption.Point=option.Point;
|
|
11395
11431
|
}
|
|
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
11432
|
|
|
11433
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
11434
|
+
|
|
11417
11435
|
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
|
-
|
|
11436
|
+
|
|
11429
11437
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
11430
11438
|
{
|
|
11431
11439
|
var item=this.ChartDrawPicture[i];
|
|
@@ -11451,15 +11459,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11451
11459
|
}
|
|
11452
11460
|
|
|
11453
11461
|
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
|
-
|
|
11462
|
+
|
|
11463
11463
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
11464
11464
|
{
|
|
11465
11465
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
@@ -11471,6 +11471,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11471
11471
|
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
11472
11472
|
|
|
11473
11473
|
++this.TouchDrawCount;
|
|
11474
|
+
|
|
11475
|
+
this.UpdateCorssCursorStatus();
|
|
11474
11476
|
}
|
|
11475
11477
|
|
|
11476
11478
|
this.DrawAnimation=function() //绘制动画 如弹幕
|
|
@@ -51926,7 +51928,6 @@ function ChartLock()
|
|
|
51926
51928
|
delete this.newMethod;
|
|
51927
51929
|
|
|
51928
51930
|
this.ClassName="ChartLock";
|
|
51929
|
-
this.WidthDiv = 0.2; // 框子宽度占比
|
|
51930
51931
|
this.LockCount = 20; // 锁最新的几个数据
|
|
51931
51932
|
this.BGColor = g_JSChartResource.IndexLock.BGColor;
|
|
51932
51933
|
this.TextColor = g_JSChartResource.IndexLock.TextColor;
|
|
@@ -51937,7 +51938,6 @@ function ChartLock()
|
|
|
51937
51938
|
this.Callback; //回调
|
|
51938
51939
|
this.IndexName; //指标名字
|
|
51939
51940
|
this.IndexID; //指标ID
|
|
51940
|
-
this.MinWidth=null; //最小宽度
|
|
51941
51941
|
|
|
51942
51942
|
|
|
51943
51943
|
this.CalculateTextSize=function(aryText, defaultFont, out)
|
|
@@ -51945,17 +51945,40 @@ function ChartLock()
|
|
|
51945
51945
|
if (!out || !IFrameSplitOperator.IsNonEmptyArray(aryText)) return false;
|
|
51946
51946
|
|
|
51947
51947
|
this.Canvas.font=defaultFont;
|
|
51948
|
-
var
|
|
51948
|
+
var defaultLineHeight=this.Canvas.measureText("擎").width; //行高
|
|
51949
|
+
var lineHeight=defaultLineHeight;
|
|
51949
51950
|
var height=0, width=0;
|
|
51950
51951
|
out.AryText=[];
|
|
51951
51952
|
for(var i=0;i<aryText.length;++i)
|
|
51952
51953
|
{
|
|
51953
51954
|
var item=aryText[i];
|
|
51954
|
-
if (!item || !item.Text) continue;
|
|
51955
|
-
|
|
51955
|
+
if (!item || (!item.Text && !item.Image)) continue;
|
|
51956
|
+
if (item.Image)
|
|
51957
|
+
{
|
|
51958
|
+
textWidth=item.Image.Width;
|
|
51959
|
+
lineHeight=item.Image.Height;
|
|
51960
|
+
}
|
|
51961
|
+
else
|
|
51962
|
+
{
|
|
51963
|
+
if (item.Font)
|
|
51964
|
+
{
|
|
51965
|
+
this.Canvas.font=item.Font;
|
|
51966
|
+
lineHeight=this.Canvas.measureText("擎").width;
|
|
51967
|
+
}
|
|
51968
|
+
else
|
|
51969
|
+
{
|
|
51970
|
+
this.Canvas.font=defaultFont;
|
|
51971
|
+
lineHeight=defaultLineHeight;
|
|
51972
|
+
}
|
|
51973
|
+
|
|
51974
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
51975
|
+
}
|
|
51956
51976
|
|
|
51957
51977
|
var lineItem={ Text:item.Text, Width:textWidth, Height:lineHeight, Color:item.Color, TextMargin:{ Top:0, Bottom:0, Left:0, Right:0 }, YOffset:0 };
|
|
51958
51978
|
if (IFrameSplitOperator.IsNumber(item.YOffset)) lineItem.YOffset=item.YOffset;
|
|
51979
|
+
if (item.Font) lineItem.Font=item.Font;
|
|
51980
|
+
if (IFrameSplitOperator.IsNumber(item.Align)) lineItem.Align=item.Align; //左右对齐 0=左 1=中 2=右
|
|
51981
|
+
if (item.Image) lineItem.Image=item.Image;
|
|
51959
51982
|
if (item.TextMargin)
|
|
51960
51983
|
{
|
|
51961
51984
|
var margin=item.TextMargin;
|
|
@@ -51980,70 +52003,78 @@ function ChartLock()
|
|
|
51980
52003
|
return true;
|
|
51981
52004
|
}
|
|
51982
52005
|
|
|
51983
|
-
this.Draw=function(
|
|
52006
|
+
this.Draw=function(bDraw)
|
|
51984
52007
|
{
|
|
51985
52008
|
this.LockRect=null;
|
|
52009
|
+
if (!bDraw) return;
|
|
51986
52010
|
if (this.NotSupportMessage)
|
|
51987
52011
|
{
|
|
51988
52012
|
this.DrawNotSupportmessage();
|
|
51989
52013
|
return;
|
|
51990
52014
|
}
|
|
51991
52015
|
|
|
51992
|
-
|
|
52016
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
52017
|
+
var bMinute=this.IsMinuteFrame();
|
|
52018
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
52019
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
52020
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
52021
|
+
var border=this.ChartFrame.GetBorder();
|
|
52022
|
+
if (bHScreen)
|
|
51993
52023
|
{
|
|
51994
|
-
|
|
51995
|
-
|
|
52024
|
+
var chartright=border.BottomEx;
|
|
52025
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
52026
|
+
}
|
|
52027
|
+
else
|
|
52028
|
+
{
|
|
52029
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
52030
|
+
var chartright=border.RightEx;
|
|
51996
52031
|
}
|
|
51997
52032
|
|
|
51998
|
-
var
|
|
51999
|
-
var
|
|
52000
|
-
|
|
52001
|
-
if (this.ChartFrame.Data != null)
|
|
52033
|
+
var kData=this.ChartFrame.Data;
|
|
52034
|
+
var left=xOffset;
|
|
52035
|
+
if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
|
|
52002
52036
|
{
|
|
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))
|
|
52037
|
+
for(var i=kData.DataOffset,j=0;i<kData.Data.length-this.LockCount && j<xPointCount-this.LockCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52009
52038
|
{
|
|
52010
|
-
var
|
|
52011
|
-
if (
|
|
52039
|
+
var kItem=kData.Data[i];
|
|
52040
|
+
if (kItem.Open==null || kItem.High==null || kItem.Low==null || kItem.Close==null) continue;
|
|
52012
52041
|
|
|
52013
|
-
|
|
52014
|
-
|
|
52015
|
-
|
|
52042
|
+
if (bMinute)
|
|
52043
|
+
{
|
|
52044
|
+
left=this.ChartFrame.GetXFromIndex(j);
|
|
52045
|
+
}
|
|
52046
|
+
else
|
|
52047
|
+
{
|
|
52048
|
+
left=xOffset;
|
|
52049
|
+
var right=xOffset+dataWidth;
|
|
52050
|
+
if (right>chartright) break;
|
|
52051
|
+
}
|
|
52016
52052
|
}
|
|
52017
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52018
52053
|
}
|
|
52019
|
-
|
|
52054
|
+
|
|
52055
|
+
if (bHScreen)
|
|
52020
52056
|
{
|
|
52021
|
-
|
|
52022
|
-
|
|
52023
|
-
|
|
52024
|
-
if (lLeft < this.ChartBorder.GetLeft())
|
|
52025
|
-
lLeft = this.ChartBorder.GetLeft();
|
|
52026
|
-
var lWidth = this.ChartBorder.GetRight() - lLeft;
|
|
52057
|
+
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
52058
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52059
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52027
52060
|
|
|
52028
|
-
|
|
52061
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
52062
|
+
this.Canvas.fillStyle =bgColor;
|
|
52063
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52064
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52065
|
+
}
|
|
52066
|
+
else
|
|
52029
52067
|
{
|
|
52030
|
-
|
|
52031
|
-
|
|
52032
|
-
|
|
52068
|
+
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
52069
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
52070
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
52071
|
+
//上下渐变
|
|
52072
|
+
var bgColor=this.SetFillStyle(this.BGColor, rtBG.Left, rtBG.Top, rtBG.Left, rtBG.Bottom);
|
|
52073
|
+
this.Canvas.fillStyle =bgColor;
|
|
52074
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
52075
|
+
this.LockRect=rtBG; //保存上锁区域
|
|
52033
52076
|
}
|
|
52034
52077
|
|
|
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
52078
|
var aryText=null;
|
|
52048
52079
|
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
52049
52080
|
else aryText=[{Text:this.Title}];
|
|
@@ -52051,85 +52082,84 @@ function ChartLock()
|
|
|
52051
52082
|
var outSize={ };
|
|
52052
52083
|
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
52053
52084
|
|
|
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
52085
|
this.Canvas.textAlign='left';
|
|
52059
52086
|
this.Canvas.textBaseline='bottom';
|
|
52060
52087
|
this.Canvas.font = this.Font;
|
|
52061
|
-
|
|
52062
|
-
|
|
52088
|
+
|
|
52089
|
+
if (bHScreen)
|
|
52063
52090
|
{
|
|
52064
|
-
var
|
|
52065
|
-
if (
|
|
52066
|
-
|
|
52091
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Width)/2;
|
|
52092
|
+
if (outSize.Width>rtBG.Height) top=rtBG.Bottom-outSize.Width;
|
|
52093
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Height)/2;
|
|
52067
52094
|
|
|
52068
|
-
|
|
52069
|
-
this.Canvas.
|
|
52070
|
-
|
|
52071
|
-
|
|
52095
|
+
this.Canvas.save();
|
|
52096
|
+
this.Canvas.translate(left, top);
|
|
52097
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
52098
|
+
var yText=0,xText=0;
|
|
52099
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52100
|
+
{
|
|
52101
|
+
var item=outSize.AryText[i];
|
|
52102
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52103
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52072
52104
|
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
var xOffset = this.ChartBorder.GetBottom();
|
|
52105
|
+
if (item.Font) this.Canvas.font = item.Font;
|
|
52106
|
+
else this.Canvas.font = this.Font;
|
|
52076
52107
|
|
|
52077
|
-
|
|
52078
|
-
|
|
52079
|
-
|
|
52080
|
-
var dataWidth=this.ChartFrame.DataWidth;
|
|
52081
|
-
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
52082
|
-
xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+2.0;
|
|
52083
|
-
var chartright=this.ChartBorder.GetBottom();
|
|
52084
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
52085
|
-
//求最后1个数据的位置
|
|
52086
|
-
for(var i=this.ChartFrame.Data.DataOffset,j=0;i<this.ChartFrame.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
52087
|
-
{
|
|
52088
|
-
var data=this.ChartFrame.Data.Data[i];
|
|
52089
|
-
if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
52108
|
+
yText+=item.Height;
|
|
52109
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52110
|
+
}
|
|
52090
52111
|
|
|
52091
|
-
|
|
52092
|
-
var right=xOffset+dataWidth;
|
|
52093
|
-
if (right>chartright) break;
|
|
52094
|
-
}
|
|
52095
|
-
lOffsetWidth = (dataWidth + distanceWidth) * this.LockCount;
|
|
52112
|
+
this.Canvas.restore();
|
|
52096
52113
|
}
|
|
52097
|
-
|
|
52114
|
+
else
|
|
52098
52115
|
{
|
|
52099
|
-
|
|
52100
|
-
|
|
52116
|
+
var left=rtBG.Left+(rtBG.Width-outSize.Width)/2;
|
|
52117
|
+
if (outSize.Width>rtBG.Width) left=rtBG.Right-outSize.Width;
|
|
52118
|
+
var top=rtBG.Top+(rtBG.Height-outSize.Height)/2;
|
|
52119
|
+
|
|
52120
|
+
var yText=top, xText=left;
|
|
52121
|
+
for(var i=0;i<outSize.AryText.length;++i)
|
|
52122
|
+
{
|
|
52123
|
+
var item=outSize.AryText[i];
|
|
52124
|
+
if (item.Image)
|
|
52125
|
+
{
|
|
52126
|
+
xText=left;
|
|
52127
|
+
if (item.Align===1)
|
|
52128
|
+
{
|
|
52129
|
+
if (outSize.Width>item.Width) xText+=(outSize.Width-item.Width)/2;
|
|
52130
|
+
}
|
|
52101
52131
|
|
|
52102
|
-
|
|
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;
|
|
52132
|
+
this.Canvas.drawImage(item.Image.Data, xText, yText, item.Image.Width, item.Image.Height);
|
|
52106
52133
|
|
|
52107
|
-
|
|
52108
|
-
|
|
52134
|
+
yText+=item.Height;
|
|
52135
|
+
}
|
|
52136
|
+
else
|
|
52137
|
+
{
|
|
52138
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
52139
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
52109
52140
|
|
|
52110
|
-
|
|
52111
|
-
|
|
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();
|
|
52141
|
+
if (item.Font) this.Canvas.font = item.Font;
|
|
52142
|
+
else this.Canvas.font = this.Font;
|
|
52121
52143
|
|
|
52122
|
-
|
|
52144
|
+
yText+=item.Height;
|
|
52145
|
+
xText=left;
|
|
52146
|
+
if (item.Align===1)
|
|
52147
|
+
{
|
|
52148
|
+
if (outSize.Width>item.Width) xText+=(outSize.Width-item.Width)/2;
|
|
52149
|
+
}
|
|
52150
|
+
|
|
52151
|
+
this.Canvas.fillText(item.Text, xText, yText+item.YOffset);
|
|
52152
|
+
}
|
|
52153
|
+
}
|
|
52154
|
+
}
|
|
52123
52155
|
}
|
|
52124
52156
|
|
|
52125
52157
|
//x,y是否在上锁区域
|
|
52126
52158
|
this.GetTooltipData=function(x,y,tooltip)
|
|
52127
52159
|
{
|
|
52128
|
-
if (this.LockRect
|
|
52160
|
+
if (!this.LockRect) return false;
|
|
52129
52161
|
|
|
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))
|
|
52162
|
+
if (Path2DHelper.PtInRect(x,y,this.LockRect))
|
|
52133
52163
|
{
|
|
52134
52164
|
tooltip.Data={ ID:this.LockID, Callback:this.Callback, IndexName:this.IndexName, IndexID:this.IndexID };
|
|
52135
52165
|
tooltip.ChartPaint=this;
|
|
@@ -62384,7 +62414,7 @@ function ChartCorssCursor()
|
|
|
62384
62414
|
|
|
62385
62415
|
this.Draw=function()
|
|
62386
62416
|
{
|
|
62387
|
-
this.Status=
|
|
62417
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
62388
62418
|
this.RightButton.Rect=null;
|
|
62389
62419
|
this.BottomButton.Rect=null;
|
|
62390
62420
|
this.LastValue=null;
|
|
@@ -62531,6 +62561,7 @@ function ChartCorssCursor()
|
|
|
62531
62561
|
}
|
|
62532
62562
|
}
|
|
62533
62563
|
|
|
62564
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
62534
62565
|
this.Canvas.stroke();
|
|
62535
62566
|
this.Canvas.restore();
|
|
62536
62567
|
|
|
@@ -62587,6 +62618,7 @@ function ChartCorssCursor()
|
|
|
62587
62618
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62588
62619
|
}
|
|
62589
62620
|
|
|
62621
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
62590
62622
|
}
|
|
62591
62623
|
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
62592
62624
|
{
|
|
@@ -62594,6 +62626,8 @@ function ChartCorssCursor()
|
|
|
62594
62626
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
62595
62627
|
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
62596
62628
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
62629
|
+
|
|
62630
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
62597
62631
|
}
|
|
62598
62632
|
|
|
62599
62633
|
if (rtBG)
|
|
@@ -62603,6 +62637,7 @@ function ChartCorssCursor()
|
|
|
62603
62637
|
this.Canvas.textBaseline="bottom";
|
|
62604
62638
|
this.Canvas.fillStyle=this.TextColor;
|
|
62605
62639
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62640
|
+
|
|
62606
62641
|
}
|
|
62607
62642
|
|
|
62608
62643
|
var complexText=
|
|
@@ -62724,6 +62759,8 @@ function ChartCorssCursor()
|
|
|
62724
62759
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62725
62760
|
|
|
62726
62761
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62762
|
+
|
|
62763
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
62727
62764
|
}
|
|
62728
62765
|
}
|
|
62729
62766
|
else if (this.ShowTextMode.Right==2) //框架内侧显示
|
|
@@ -62737,6 +62774,8 @@ function ChartCorssCursor()
|
|
|
62737
62774
|
this.DrawComplexRightText(rtBG,complexText,textSize);
|
|
62738
62775
|
|
|
62739
62776
|
if (this.RightButton.Enable) this.DrawRightButtonV2(rtBG, complexText, textSize, buttonData);
|
|
62777
|
+
|
|
62778
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
62740
62779
|
}
|
|
62741
62780
|
}
|
|
62742
62781
|
|
|
@@ -62802,6 +62841,8 @@ function ChartCorssCursor()
|
|
|
62802
62841
|
if (this.StringFormatX.KItem) buttonData.KItem=this.StringFormatX.KItem;
|
|
62803
62842
|
this.BottomButton.Rect=rtBG;
|
|
62804
62843
|
this.BottomButton.Data=buttonData;
|
|
62844
|
+
|
|
62845
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
62805
62846
|
}
|
|
62806
62847
|
}
|
|
62807
62848
|
|
|
@@ -62850,8 +62891,6 @@ function ChartCorssCursor()
|
|
|
62850
62891
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
62851
62892
|
}
|
|
62852
62893
|
}
|
|
62853
|
-
|
|
62854
|
-
this.Status=1;
|
|
62855
62894
|
}
|
|
62856
62895
|
|
|
62857
62896
|
this.DrawComplexRightText=function(rtBG, complexText, size)
|
|
@@ -63139,6 +63178,7 @@ function ChartCorssCursor()
|
|
|
63139
63178
|
|
|
63140
63179
|
this.HScreenDraw=function()
|
|
63141
63180
|
{
|
|
63181
|
+
this.Status=JSCHART_CORSSCURSOR_STATUS_ID.NONE_ID;
|
|
63142
63182
|
var x=this.LastPoint.X;
|
|
63143
63183
|
var y=this.LastPoint.Y;
|
|
63144
63184
|
|
|
@@ -63232,6 +63272,8 @@ function ChartCorssCursor()
|
|
|
63232
63272
|
}
|
|
63233
63273
|
}
|
|
63234
63274
|
|
|
63275
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID;
|
|
63276
|
+
|
|
63235
63277
|
this.Canvas.stroke();
|
|
63236
63278
|
this.Canvas.restore();
|
|
63237
63279
|
|
|
@@ -63292,6 +63334,8 @@ function ChartCorssCursor()
|
|
|
63292
63334
|
}
|
|
63293
63335
|
|
|
63294
63336
|
this.Canvas.restore();
|
|
63337
|
+
|
|
63338
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_TEXT_ID;
|
|
63295
63339
|
}
|
|
63296
63340
|
else if (this.ShowTextMode.Left==2)
|
|
63297
63341
|
{
|
|
@@ -63309,6 +63353,8 @@ function ChartCorssCursor()
|
|
|
63309
63353
|
this.Canvas.fillText(text,2,0,textWidth);
|
|
63310
63354
|
|
|
63311
63355
|
this.Canvas.restore();
|
|
63356
|
+
|
|
63357
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.LEFT_INTER_TEXT_ID;
|
|
63312
63358
|
}
|
|
63313
63359
|
|
|
63314
63360
|
if (this.StringFormatY.RText)
|
|
@@ -63379,6 +63425,8 @@ function ChartCorssCursor()
|
|
|
63379
63425
|
}
|
|
63380
63426
|
|
|
63381
63427
|
this.Canvas.restore();
|
|
63428
|
+
|
|
63429
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_TEXT_ID;
|
|
63382
63430
|
}
|
|
63383
63431
|
else if (this.ShowTextMode.Right==2)
|
|
63384
63432
|
{
|
|
@@ -63396,6 +63444,8 @@ function ChartCorssCursor()
|
|
|
63396
63444
|
this.Canvas.fillText(text,-2,0,textWidth);
|
|
63397
63445
|
|
|
63398
63446
|
this.Canvas.restore();
|
|
63447
|
+
|
|
63448
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.RIGHT_INTER_TEXT_ID;
|
|
63399
63449
|
}
|
|
63400
63450
|
}
|
|
63401
63451
|
|
|
@@ -63469,10 +63519,10 @@ function ChartCorssCursor()
|
|
|
63469
63519
|
|
|
63470
63520
|
this.Canvas.restore();
|
|
63471
63521
|
}
|
|
63522
|
+
|
|
63523
|
+
this.Status|=JSCHART_CORSSCURSOR_STATUS_ID.BOTTOM_TEXT_ID;
|
|
63472
63524
|
}
|
|
63473
63525
|
}
|
|
63474
|
-
|
|
63475
|
-
this.Status=1;
|
|
63476
63526
|
}
|
|
63477
63527
|
|
|
63478
63528
|
//data={ e:e, PreventDefault:false, KeyID, Draw:是否需要重绘 }
|
|
@@ -63544,6 +63594,7 @@ function ChartCorssCursor()
|
|
|
63544
63594
|
}
|
|
63545
63595
|
|
|
63546
63596
|
|
|
63597
|
+
|
|
63547
63598
|
////////////////////////////////////////////////////////////////////////////////
|
|
63548
63599
|
//深度图十字光标
|
|
63549
63600
|
function DepthChartCorssCursor()
|
|
@@ -90729,6 +90780,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90729
90780
|
if (!item.Frame.LockPaint.GetTooltipData(x,y,tooltip)) continue;
|
|
90730
90781
|
|
|
90731
90782
|
tooltip.HQChart=this;
|
|
90783
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
90784
|
+
if (event && event.Callback)
|
|
90785
|
+
{
|
|
90786
|
+
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
90787
|
+
event.Callback(event,sendData,this);
|
|
90788
|
+
}
|
|
90789
|
+
|
|
90732
90790
|
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
90733
90791
|
return true;
|
|
90734
90792
|
}
|
|
@@ -105089,239 +105147,9 @@ function IsFundSymbol(symbol)
|
|
|
105089
105147
|
return false;
|
|
105090
105148
|
}
|
|
105091
105149
|
|
|
105092
|
-
//设置对话框工厂类
|
|
105093
|
-
function DialogFactory()
|
|
105094
|
-
{
|
|
105095
|
-
//[key:name, { Create:function(divElement) { return new class(divElement); }} ]
|
|
105096
|
-
this.DataMap=new Map(
|
|
105097
|
-
[
|
|
105098
|
-
["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
|
|
105099
|
-
]);
|
|
105100
|
-
|
|
105101
|
-
this.Create=function(name, option)
|
|
105102
|
-
{
|
|
105103
|
-
if (!this.DataMap.has(name))
|
|
105104
|
-
{
|
|
105105
|
-
JSConsole.Chart.Warn(`[DialogFactory::Create] can't find class=${name}.`);
|
|
105106
|
-
return null;
|
|
105107
|
-
}
|
|
105108
|
-
|
|
105109
|
-
var item=this.DataMap.get(name);
|
|
105110
|
-
return item.Create(option);
|
|
105111
|
-
}
|
|
105112
|
-
|
|
105113
|
-
this.Add=function(name, option)
|
|
105114
|
-
{
|
|
105115
|
-
this.DataMap.set(name, { Create:option.Create } );
|
|
105116
|
-
}
|
|
105117
|
-
}
|
|
105118
|
-
|
|
105119
|
-
var g_DialogFactory=new DialogFactory();
|
|
105120
|
-
|
|
105121
|
-
//设置窗口基类
|
|
105122
|
-
function IDivDialog(divElement)
|
|
105123
|
-
{
|
|
105124
|
-
this.DivElement=divElement; //父节点
|
|
105125
|
-
this.ID=null; //div id
|
|
105126
|
-
this.TimeOut=null; //定时器
|
|
105127
|
-
|
|
105128
|
-
//隐藏窗口
|
|
105129
|
-
this.Hide=function()
|
|
105130
|
-
{
|
|
105131
|
-
$("#"+this.ID).hide();
|
|
105132
|
-
}
|
|
105133
|
-
|
|
105134
|
-
//显示窗口
|
|
105135
|
-
this.Show=function(left,top,width,height)
|
|
105136
|
-
{
|
|
105137
|
-
var cssData={display:'block'};
|
|
105138
|
-
if (IFrameSplitOperator.IsNumber(left)) cssData.left=left+'px';
|
|
105139
|
-
if (IFrameSplitOperator.IsNumber(top)) cssData.top=top+'px';
|
|
105140
|
-
if (IFrameSplitOperator.IsNumber(width)) cssData.width=width+'px';
|
|
105141
|
-
if (IFrameSplitOperator.IsNumber(height)) cssData.height=height+'px';
|
|
105142
|
-
|
|
105143
|
-
$("#"+this.ID).css(cssData);
|
|
105144
|
-
}
|
|
105145
|
-
}
|
|
105146
|
-
|
|
105147
|
-
//等待动画窗口
|
|
105148
|
-
function WaitDialog(divElement)
|
|
105149
|
-
{
|
|
105150
|
-
this.newMethod=IDivDialog; //派生
|
|
105151
|
-
this.newMethod(divElement);
|
|
105152
|
-
delete this.newMethod;
|
|
105153
|
-
|
|
105154
|
-
this.Title='加载中......';
|
|
105155
|
-
this.Dialog;
|
|
105156
|
-
|
|
105157
|
-
//隐藏窗口
|
|
105158
|
-
this.Close=function()
|
|
105159
|
-
{
|
|
105160
|
-
if (this.Dialog)
|
|
105161
|
-
{
|
|
105162
|
-
this.DivElement.removeChild(this.Dialog);
|
|
105163
|
-
this.Dialog=null;
|
|
105164
|
-
}
|
|
105165
|
-
}
|
|
105166
|
-
|
|
105167
|
-
this.SetTitle=function(title)
|
|
105168
|
-
{
|
|
105169
|
-
this.Title=title;
|
|
105170
|
-
if (!this.Dialog) return;
|
|
105171
|
-
//TODO: 更新标题数据
|
|
105172
|
-
}
|
|
105173
|
-
|
|
105174
|
-
this.Create=function()
|
|
105175
|
-
{
|
|
105176
|
-
this.ID=Guid();
|
|
105177
|
-
var div=document.createElement('div');
|
|
105178
|
-
div.className='jchart-wait-box';
|
|
105179
|
-
div.id=this.ID;
|
|
105180
|
-
div.innerHTML=
|
|
105181
|
-
`<div class='parameter jchart-kline-match-box'>
|
|
105182
|
-
<div class='parameter-header'>
|
|
105183
|
-
<span>${this.Title}</span>
|
|
105184
|
-
</div>
|
|
105185
|
-
</div>`.trim();
|
|
105186
|
-
|
|
105187
|
-
this.DivElement.appendChild(div);
|
|
105188
|
-
this.Dialog=div;
|
|
105189
|
-
}
|
|
105190
|
-
|
|
105191
|
-
//显示
|
|
105192
|
-
this.DoModal=function(event)
|
|
105193
|
-
{
|
|
105194
|
-
this.Title=event.data.Title;
|
|
105195
|
-
var chart=event.data.Chart;
|
|
105196
|
-
if (this.ID==null) this.Create(); //第1次 需要创建div
|
|
105197
|
-
|
|
105198
|
-
//居中显示
|
|
105199
|
-
var border=chart.Frame.ChartBorder;
|
|
105200
|
-
var scrollPos=GetScrollPosition();
|
|
105201
|
-
var left=border.GetWidth()/2;
|
|
105202
|
-
var top=border.GetHeight()/2;
|
|
105203
|
-
|
|
105204
|
-
this.Show(left,top,200,40); //显示
|
|
105205
|
-
}
|
|
105206
|
-
}
|
|
105207
|
-
|
|
105208
|
-
//画图工具 单个图形设置
|
|
105209
|
-
function ChartPictureSettingMenu(divElement)
|
|
105210
|
-
{
|
|
105211
|
-
this.newMethod=IDivDialog; //派生
|
|
105212
|
-
this.newMethod(divElement);
|
|
105213
|
-
delete this.newMethod;
|
|
105214
|
-
|
|
105215
|
-
this.HQChart;
|
|
105216
|
-
this.ChartPicture;
|
|
105217
|
-
this.SubToolsDiv;
|
|
105218
|
-
this.SettingMenu;
|
|
105219
|
-
this.SettingPV;
|
|
105220
|
-
|
|
105221
|
-
this.DoModal=function(event)
|
|
105222
|
-
{
|
|
105223
|
-
var $body;
|
|
105224
|
-
if (!this.SubToolsDiv)
|
|
105225
|
-
{
|
|
105226
|
-
this.ID=Guid();
|
|
105227
|
-
var div=document.createElement("div");
|
|
105228
|
-
div.className='subTolls';
|
|
105229
|
-
div.id=this.ID;
|
|
105230
|
-
this.DivElement.appendChild(div);
|
|
105231
|
-
//$body = $("."+event.data.HQChart.ClassName).context.body;
|
|
105232
|
-
//$body.append(div);
|
|
105233
|
-
this.SubToolsDiv=div;
|
|
105234
|
-
}
|
|
105235
|
-
this.HQChart=event.data.HQChart;
|
|
105236
|
-
this.ChartPicture=event.data.ChartPicture;
|
|
105237
|
-
|
|
105238
|
-
var pixelTatio = GetDevicePixelRatio();
|
|
105239
|
-
var frame=this.HQChart.Frame.SubFrame[0].Frame;
|
|
105240
|
-
// var top=frame.ChartBorder.GetTopTitle();
|
|
105241
|
-
var top=frame.ChartBorder.Top + 40;
|
|
105242
|
-
// var right=frame.ChartBorder.GetRight();
|
|
105243
|
-
var right=frame.ChartBorder.Right;
|
|
105244
|
-
var left=frame.ChartBorder.GetLeft();
|
|
105245
|
-
var className = this.ChartPicture.ClassName; //='ChartDrawPictureText'时加“设置”
|
|
105246
|
-
var lineColor=this.ChartPicture.LineColor;
|
|
105247
|
-
if (lineColor.indexOf("rgb(")==0 || lineColor.indexOf("RGB(")==0)
|
|
105248
|
-
lineColor=IChartDrawPicture.RGBToHex(lineColor.toLowerCase());
|
|
105249
|
-
var toolsDiv = "";
|
|
105250
|
-
if(className === 'ChartDrawPictureText')
|
|
105251
|
-
{
|
|
105252
|
-
toolsDiv = '<span class="changes-color" title="改变图形颜色">'+
|
|
105253
|
-
'<i class="iconfont icon-bianji"></i>'+
|
|
105254
|
-
'<input type="color" name="color" id="color" class="change-color" value="'+ lineColor +'">'+
|
|
105255
|
-
'</span>\n' +
|
|
105256
|
-
'<span class="subtool-set" title="设置"><i class="iconfont icon-shezhi"></i></span>'+
|
|
105257
|
-
'<span class="subtool-del"><i class="iconfont icon-recycle_bin"></i></span>';
|
|
105258
|
-
}
|
|
105259
|
-
else if (className=="ChartDrawVolProfile")
|
|
105260
|
-
{
|
|
105261
|
-
toolsDiv='<span class="vp-set" title="设置"><i class="iconfont icon-shezhi"></i></span>'+
|
|
105262
|
-
'<span class="subtool-del"><i class="iconfont icon-recycle_bin"></i></span>';
|
|
105263
|
-
}
|
|
105264
|
-
else
|
|
105265
|
-
{
|
|
105266
|
-
toolsDiv =
|
|
105267
|
-
'<p class="changes-color" title="改变图形颜色"><i class="iconfont icon-bianji"></i>' +
|
|
105268
|
-
'<input type="color" name="color" id="color" class="change-color" value="'+ lineColor +'"></p>\n' +
|
|
105269
|
-
' <p class="subtool-del"><i class="iconfont icon-recycle_bin"></i></p>';
|
|
105270
|
-
}
|
|
105271
|
-
|
|
105272
|
-
|
|
105273
|
-
this.SubToolsDiv.style.right = right/pixelTatio + "px";
|
|
105274
|
-
this.SubToolsDiv.style.top = top/pixelTatio + "px";
|
|
105275
|
-
this.SubToolsDiv.innerHTML = toolsDiv;
|
|
105276
|
-
this.SubToolsDiv.style.position = "absolute";
|
|
105277
|
-
this.SubToolsDiv.style.display = "block";
|
|
105278
|
-
|
|
105279
|
-
var hqChart = this.HQChart;
|
|
105280
|
-
var picture = this.ChartPicture;
|
|
105281
|
-
var subToolDiv = this.SubToolsDiv;
|
|
105282
|
-
$(".subtool-del").click(function(){
|
|
105283
|
-
hqChart.SelectChartDrawPicture=null;
|
|
105284
|
-
hqChart.ClearChartDrawPicture(picture);
|
|
105285
|
-
// subToolDiv.innerHTML = "";
|
|
105286
|
-
$(".subTolls").css("display","none");
|
|
105287
|
-
});
|
|
105288
|
-
var self = this;
|
|
105289
|
-
$(".subtool-set").click(function(){
|
|
105290
|
-
$(self.SubToolsDiv).hide();
|
|
105291
|
-
//创建div设置窗口
|
|
105292
|
-
if (!self.SettingMenu) self.SettingMenu=new ChartPictureTextSettingMenu(frame.ChartBorder.UIElement.parentNode);
|
|
105293
|
-
|
|
105294
|
-
self.SettingMenu.ChartPicture=picture;
|
|
105295
|
-
self.SettingMenu.HQChart=hqChart;
|
|
105296
|
-
self.SettingMenu.Position={Left:right + 80,Top:top + 20};
|
|
105297
|
-
self.SettingMenu.DoModal();
|
|
105298
|
-
});
|
|
105299
|
-
$(".changes-color").click(function () {
|
|
105300
|
-
document.getElementById('color').click();
|
|
105301
|
-
$(".change-color").change(function () {
|
|
105302
|
-
var color = $(".change-color").val();
|
|
105303
|
-
picture.LineColor = color;
|
|
105304
|
-
picture.PointColor = color;
|
|
105305
|
-
if (hqChart.ChartDrawStorage) hqChart.ChartDrawStorage.SaveDrawData(picture); //保存下
|
|
105306
|
-
});
|
|
105307
|
-
});
|
|
105308
|
-
|
|
105309
|
-
//成交量分布图设置
|
|
105310
|
-
$(".vp-set").click(function()
|
|
105311
|
-
{
|
|
105312
|
-
if (!self.SettingPV) self.SettingPV=new ChartPictureVolProfileSettingMenu(frame.ChartBorder.UIElement.parentNode);
|
|
105313
|
-
self.SettingPV.ChartPicture=picture;
|
|
105314
|
-
self.SettingPV.HQChart=hqChart;
|
|
105315
|
-
self.SettingPV.Position={Left:right + 80,Top:top + 20};
|
|
105316
|
-
self.SettingPV.DoModal();
|
|
105317
|
-
});
|
|
105318
|
-
|
|
105319
|
-
|
|
105320
|
-
JSConsole.Chart.Log("[ChartPictureSettingMenu::DoModal]", {Top:top,Left:left, Right:right});
|
|
105321
|
-
}
|
|
105322
|
-
}
|
|
105323
105150
|
|
|
105324
105151
|
|
|
105152
|
+
/*
|
|
105325
105153
|
function ChartPictureVolProfileSettingMenu(divElement)
|
|
105326
105154
|
{
|
|
105327
105155
|
this.newMethod=IDivDialog; //派生
|
|
@@ -105410,6 +105238,7 @@ function ChartPictureVolProfileSettingMenu(divElement)
|
|
|
105410
105238
|
}
|
|
105411
105239
|
}
|
|
105412
105240
|
}
|
|
105241
|
+
*/
|
|
105413
105242
|
|
|
105414
105243
|
|
|
105415
105244
|
|
|
@@ -158672,6 +158501,11 @@ function JSDialogModifyDraw()
|
|
|
158672
158501
|
this.HQChart.Draw();
|
|
158673
158502
|
}
|
|
158674
158503
|
|
|
158504
|
+
this.AdvancedSetting=function()
|
|
158505
|
+
{
|
|
158506
|
+
|
|
158507
|
+
}
|
|
158508
|
+
|
|
158675
158509
|
this.GetRandomText=function(text)
|
|
158676
158510
|
{
|
|
158677
158511
|
var ARY_TEXT=["下跌形态","反转十字星","低位档五阳线","倒V型反转","双顶","持续整理形态"];
|
|
@@ -165768,7 +165602,7 @@ function HQChartScriptWorker()
|
|
|
165768
165602
|
|
|
165769
165603
|
|
|
165770
165604
|
|
|
165771
|
-
var HQCHART_VERSION="1.1.
|
|
165605
|
+
var HQCHART_VERSION="1.1.15105";
|
|
165772
165606
|
|
|
165773
165607
|
function PrintHQChartVersion()
|
|
165774
165608
|
{
|
|
@@ -165934,6 +165768,7 @@ export default {
|
|
|
165934
165768
|
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
165935
165769
|
JSCHART_MENU_ID:JSCHART_MENU_ID,
|
|
165936
165770
|
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
|
|
165771
|
+
JSCHART_CORSSCURSOR_STATUS_ID:JSCHART_CORSSCURSOR_STATUS_ID, //十字光标状态
|
|
165937
165772
|
},
|
|
165938
165773
|
|
|
165939
165774
|
|