hqchart 1.1.13278 → 1.1.13286
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 +77 -61
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +3 -0
- package/src/jscommon/umychart.complier.js +9 -10
- package/src/jscommon/umychart.js +286 -130
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +49 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +11 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +14 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +296 -141
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +299 -141
|
@@ -6415,6 +6415,8 @@ var JSCHART_EVENT_ID=
|
|
|
6415
6415
|
ON_CHANGE_INDEX:150, //切换指标
|
|
6416
6416
|
ON_MENU_COMMAND:151, //菜单时间回调
|
|
6417
6417
|
ON_CREATE_RIGHT_MENU:152, //创建右键菜单
|
|
6418
|
+
|
|
6419
|
+
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
6418
6420
|
}
|
|
6419
6421
|
|
|
6420
6422
|
var JSCHART_OPERATOR_ID=
|
|
@@ -9610,14 +9612,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9610
9612
|
}
|
|
9611
9613
|
item.DrawStatus=drawStatus;
|
|
9612
9614
|
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
item.PointInfo=null;
|
|
9619
|
-
}
|
|
9620
|
-
|
|
9615
|
+
var pointInfo=null;
|
|
9616
|
+
if (option && IFrameSplitOperator.IsNumber(option.ClientPos) && option.Point) //当前鼠标所在位置的详细信息 包含盘前盘后
|
|
9617
|
+
pointInfo={ ClientPos:option.ClientPos, Point:{ X:option.Point.X, Y:option.Point.Y }};
|
|
9618
|
+
item.PointInfo=pointInfo;
|
|
9619
|
+
|
|
9621
9620
|
item.Draw(moveonPoint, this.LastMouseStatus);
|
|
9622
9621
|
}
|
|
9623
9622
|
|
|
@@ -10377,9 +10376,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10377
10376
|
for(var i=0;i<border.DayBorder.length;++i)
|
|
10378
10377
|
{
|
|
10379
10378
|
var client=border.DayBorder[i];
|
|
10380
|
-
this.Canvas.beginPath();
|
|
10381
|
-
this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);
|
|
10382
|
-
if (this.Canvas.isPointInPath(x,y)) return 1;
|
|
10383
10379
|
|
|
10384
10380
|
//盘前
|
|
10385
10381
|
this.Canvas.beginPath();
|
|
@@ -10387,6 +10383,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10387
10383
|
if (this.Canvas.isPointInPath(x,y))
|
|
10388
10384
|
return 200+parseInt(i);
|
|
10389
10385
|
|
|
10386
|
+
//盘中
|
|
10387
|
+
this.Canvas.beginPath();
|
|
10388
|
+
this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);
|
|
10389
|
+
if (this.Canvas.isPointInPath(x,y)) return 1;
|
|
10390
|
+
|
|
10390
10391
|
//盘后
|
|
10391
10392
|
this.Canvas.beginPath();
|
|
10392
10393
|
this.Canvas.rect(client.RightEx,border.TopEx,client.Right-client.RightEx,border.BottomEx-border.TopEx);
|
|
@@ -13666,6 +13667,8 @@ function ChartBorder()
|
|
|
13666
13667
|
var item={ Left:this.Left+dayWidth*i, Right:this.Left+dayWidth*(i+1) };
|
|
13667
13668
|
item.LeftEx=item.Left+this.MultiDayMinute.Left;
|
|
13668
13669
|
item.RightEx=item.Right-this.MultiDayMinute.Right;
|
|
13670
|
+
if (i>0) item.Left+=1; //第2天的盘前 移到一个像素,跟上一天分开
|
|
13671
|
+
|
|
13669
13672
|
dayBorder.push(item);
|
|
13670
13673
|
}
|
|
13671
13674
|
|
|
@@ -14335,6 +14338,26 @@ function IChartFramePainting()
|
|
|
14335
14338
|
{
|
|
14336
14339
|
|
|
14337
14340
|
}
|
|
14341
|
+
|
|
14342
|
+
//bIncludeOverlay =false不包含叠加框架 true=主框架+叠加框架 默认true
|
|
14343
|
+
this.IsMinuteFrame=function(bIncludeOverlay)
|
|
14344
|
+
{
|
|
14345
|
+
var aryName=["MinuteFrame", "MinuteHScreenFrame", "OverlayMinuteFrame", "OverlayMinuteHScreenFrame"];
|
|
14346
|
+
if (bIncludeOverlay===false) aryName=["MinuteFrame", "MinuteHScreenFrame"];
|
|
14347
|
+
|
|
14348
|
+
var isMinute=aryName.includes(this.ClassName);
|
|
14349
|
+
return isMinute;
|
|
14350
|
+
}
|
|
14351
|
+
|
|
14352
|
+
//bIncludeOverlay =false不包含叠加框架 true=主框架+叠加框架 默认true
|
|
14353
|
+
this.IsKLineFrame=function(bIncludeOverlay)
|
|
14354
|
+
{
|
|
14355
|
+
var aryName=["KLineFrame", "KLineHScreenFrame", "KLineHScreenFrame", "OverlayKLineHScreenFrame"];
|
|
14356
|
+
if (bIncludeOverlay===false) aryName=["KLineFrame", "KLineHScreenFrame"];
|
|
14357
|
+
|
|
14358
|
+
var isKline=aryName.includes(this.ClassName);
|
|
14359
|
+
return isKline;
|
|
14360
|
+
}
|
|
14338
14361
|
}
|
|
14339
14362
|
|
|
14340
14363
|
//空框架只画边框
|
|
@@ -22806,18 +22829,31 @@ function HQTradeFrame()
|
|
|
22806
22829
|
}
|
|
22807
22830
|
|
|
22808
22831
|
//清空Y轴坐标的最大最小值
|
|
22809
|
-
this.ClearYCoordinateMaxMin=function()
|
|
22832
|
+
this.ClearYCoordinateMaxMin=function(windowIndex)
|
|
22810
22833
|
{
|
|
22811
|
-
|
|
22834
|
+
if (IFrameSplitOperator.IsNumber(windowIndex))
|
|
22812
22835
|
{
|
|
22813
|
-
var subItem=this.SubFrame[
|
|
22814
|
-
|
|
22836
|
+
var subItem=this.SubFrame[windowIndex];
|
|
22837
|
+
if (!subItem || !subItem.Frame) return;
|
|
22815
22838
|
if (frame.YMaxMin)
|
|
22816
22839
|
{
|
|
22817
22840
|
frame.YMaxMin.Max=null;
|
|
22818
22841
|
frame.YMaxMin.Min=null;
|
|
22819
22842
|
}
|
|
22820
22843
|
}
|
|
22844
|
+
else
|
|
22845
|
+
{
|
|
22846
|
+
for(var i=0;i<this.SubFrame.length;++i)
|
|
22847
|
+
{
|
|
22848
|
+
var subItem=this.SubFrame[i];
|
|
22849
|
+
var frame=subItem.Frame;
|
|
22850
|
+
if (frame.YMaxMin)
|
|
22851
|
+
{
|
|
22852
|
+
frame.YMaxMin.Max=null;
|
|
22853
|
+
frame.YMaxMin.Min=null;
|
|
22854
|
+
}
|
|
22855
|
+
}
|
|
22856
|
+
}
|
|
22821
22857
|
}
|
|
22822
22858
|
|
|
22823
22859
|
this.SetLanguage=function(languageID)
|
|
@@ -56412,6 +56448,7 @@ function DynamicChartTitlePainting()
|
|
|
56412
56448
|
this.SelectedColor=g_JSChartResource.IndexTitleSelectedColor;
|
|
56413
56449
|
|
|
56414
56450
|
this.IsKLineFrame=false; //是否是K线框架标题
|
|
56451
|
+
this.IsMinuteFrame=false;
|
|
56415
56452
|
this.Identify; //指标ID
|
|
56416
56453
|
this.SelectedChart; //选中的图形
|
|
56417
56454
|
this.ArgumentsText; //参数信息
|
|
@@ -56434,6 +56471,7 @@ function DynamicChartTitlePainting()
|
|
|
56434
56471
|
this.OverlayDynamicTitle=new Map(); //key , value={ OutName, OutValue }
|
|
56435
56472
|
|
|
56436
56473
|
this.IsShowMainIndexTitle=true; //是否显示主图指标标题
|
|
56474
|
+
this.MainTitlePaint=null; //主标题
|
|
56437
56475
|
|
|
56438
56476
|
this.ReloadResource=function()
|
|
56439
56477
|
{
|
|
@@ -56848,7 +56886,8 @@ function DynamicChartTitlePainting()
|
|
|
56848
56886
|
this.Buttons=[];
|
|
56849
56887
|
if (this.Frame.IsMinSize) return;
|
|
56850
56888
|
|
|
56851
|
-
this.IsKLineFrame= this.Frame.
|
|
56889
|
+
this.IsKLineFrame= this.Frame.IsKLineFrame(false);
|
|
56890
|
+
this.IsMinuteFrame=this.Frame.IsMinuteFrame(false);
|
|
56852
56891
|
this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
|
|
56853
56892
|
this.IsShowNameArrow=this.Frame.IsShowNameArrow;
|
|
56854
56893
|
this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
|
|
@@ -56947,108 +56986,19 @@ function DynamicChartTitlePainting()
|
|
|
56947
56986
|
if (isShowLastData) return;
|
|
56948
56987
|
}
|
|
56949
56988
|
|
|
56950
|
-
|
|
56989
|
+
var rtText={ Left:left, Right:left };
|
|
56990
|
+
if (this.IsMinuteFrame && this.PointInfo && ( this.PointInfo.ClientPos==2 || this.PointInfo.ClientPos==3 || (this.PointInfo.ClientPos>=200&& this.PointInfo.ClientPos<=299) || (this.PointInfo.ClientPos>=300&& this.PointInfo.ClientPos<=399) ))
|
|
56951
56991
|
{
|
|
56952
|
-
var
|
|
56953
|
-
|
|
56954
|
-
if (
|
|
56955
|
-
|
|
56956
|
-
var valueText=outText.Text;
|
|
56957
|
-
var aryText=outText.ArrayText;
|
|
56958
|
-
|
|
56959
|
-
if (aryText) //多变量输出
|
|
56960
|
-
{
|
|
56961
|
-
var text;
|
|
56962
|
-
for(var k=0;k<aryText.length;++k)
|
|
56963
|
-
{
|
|
56964
|
-
var titleItem=aryText[k];
|
|
56965
|
-
if (titleItem.Name) text=titleItem.Name+":"+titleItem.Text;
|
|
56966
|
-
else text=titleItem.Text;
|
|
56967
|
-
|
|
56968
|
-
var space=this.ParamSpace*GetDevicePixelRatio();
|
|
56969
|
-
var indexTextWidth=this.Canvas.measureText(text).width; //标题+数值长度
|
|
56970
|
-
var textWidth=indexTextWidth;
|
|
56971
|
-
|
|
56972
|
-
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
56973
|
-
{
|
|
56974
|
-
var xLeft=left;
|
|
56975
|
-
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
56976
|
-
{
|
|
56977
|
-
var outItem=titleItem.TextEx[n];
|
|
56978
|
-
var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;
|
|
56979
|
-
outItem.Width=outTextWidth;
|
|
56980
|
-
outItem.Left=xLeft;
|
|
56981
|
-
|
|
56982
|
-
textWidth+=outTextWidth;
|
|
56983
|
-
xLeft+=outTextWidth;
|
|
56984
|
-
}
|
|
56985
|
-
}
|
|
56986
|
-
|
|
56987
|
-
if ((left+textWidth+space)>right) break;
|
|
56988
|
-
|
|
56989
|
-
if (titleItem.BG) //背景
|
|
56990
|
-
{
|
|
56991
|
-
var textHeight=this.Canvas.measureText("擎").width+2;
|
|
56992
|
-
var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
|
|
56993
|
-
this.Canvas.fillStyle=titleItem.BG;
|
|
56994
|
-
this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
|
|
56995
|
-
|
|
56996
|
-
this.Canvas.fillStyle=titleItem.Color;
|
|
56997
|
-
this.Canvas.fillText(text,rtBG.Left+1,bottom,indexTextWidth);
|
|
56998
|
-
left+=indexTextWidth;
|
|
56999
|
-
|
|
57000
|
-
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
57001
|
-
{
|
|
57002
|
-
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
57003
|
-
{
|
|
57004
|
-
var outItem=titleItem.TextEx[n];
|
|
57005
|
-
this.Canvas.fillStyle=outItem.TextColor;
|
|
57006
|
-
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
57007
|
-
left+=outItem.Width;
|
|
57008
|
-
}
|
|
57009
|
-
}
|
|
57010
|
-
|
|
57011
|
-
left+=space;
|
|
57012
|
-
}
|
|
57013
|
-
else
|
|
57014
|
-
{
|
|
57015
|
-
this.Canvas.fillStyle=titleItem.Color;
|
|
57016
|
-
this.Canvas.fillText(text,left,bottom,indexTextWidth);
|
|
57017
|
-
left+=indexTextWidth;
|
|
57018
|
-
|
|
57019
|
-
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
57020
|
-
{
|
|
57021
|
-
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
57022
|
-
{
|
|
57023
|
-
var outItem=titleItem.TextEx[n];
|
|
57024
|
-
this.Canvas.fillStyle=outItem.TextColor;
|
|
57025
|
-
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
57026
|
-
left+=outItem.Width;
|
|
57027
|
-
}
|
|
57028
|
-
}
|
|
57029
|
-
|
|
57030
|
-
left+=space;
|
|
57031
|
-
}
|
|
57032
|
-
}
|
|
57033
|
-
}
|
|
57034
|
-
else
|
|
57035
|
-
{
|
|
57036
|
-
this.Canvas.fillStyle=item.Color;
|
|
57037
|
-
var text=valueText;
|
|
57038
|
-
if (item.Name)
|
|
57039
|
-
{
|
|
57040
|
-
var dyTitle=this.GetDynamicOutName(item.Name);
|
|
57041
|
-
if (dyTitle) text=dyTitle+":"+valueText;
|
|
57042
|
-
else text=item.Name+":"+valueText;
|
|
57043
|
-
}
|
|
57044
|
-
var space=this.ParamSpace*GetDevicePixelRatio();
|
|
57045
|
-
var textWidth=this.Canvas.measureText(text).width+space;
|
|
57046
|
-
if ((left+textWidth)>right) break;
|
|
57047
|
-
|
|
57048
|
-
this.Canvas.fillText(text,left,bottom,textWidth);
|
|
57049
|
-
left+=textWidth;
|
|
57050
|
-
}
|
|
56992
|
+
var result={ PreventDefault:false }
|
|
56993
|
+
this.DrawMainCallAuction({ Left:left, Right:right, Bottom:bottom }, rtText, result);
|
|
56994
|
+
if (result.PreventDefault===false) this.DrawMainIndexTitle({ Left:left, Right:right, Bottom:bottom }, isShowLastData, rtText);
|
|
57051
56995
|
}
|
|
56996
|
+
else
|
|
56997
|
+
{
|
|
56998
|
+
this.DrawMainIndexTitle({ Left:left, Right:right, Bottom:bottom }, isShowLastData, rtText);
|
|
56999
|
+
}
|
|
57000
|
+
|
|
57001
|
+
left=rtText.Left;
|
|
57052
57002
|
|
|
57053
57003
|
if (this.Explain) //说明信息
|
|
57054
57004
|
{
|
|
@@ -57252,6 +57202,185 @@ function DynamicChartTitlePainting()
|
|
|
57252
57202
|
return { Text:valueText, ArrayText:aryText };
|
|
57253
57203
|
}
|
|
57254
57204
|
|
|
57205
|
+
//绘制主图指标 rtText 返回画完以后的区域
|
|
57206
|
+
this.DrawMainIndexTitle=function(positionInfo, isShowLastData, rtText)
|
|
57207
|
+
{
|
|
57208
|
+
if (!this.IsShowMainIndexTitle) return;
|
|
57209
|
+
|
|
57210
|
+
var left=positionInfo.Left;
|
|
57211
|
+
var right=positionInfo.Right;
|
|
57212
|
+
var bottom=positionInfo.Bottom;
|
|
57213
|
+
|
|
57214
|
+
for(var i=0; i<this.Data.length; ++i)
|
|
57215
|
+
{
|
|
57216
|
+
var item=this.Data[i];
|
|
57217
|
+
var outText=this.GetTitleItem(item, isShowLastData, i);
|
|
57218
|
+
if (!outText) continue;
|
|
57219
|
+
|
|
57220
|
+
var valueText=outText.Text;
|
|
57221
|
+
var aryText=outText.ArrayText;
|
|
57222
|
+
|
|
57223
|
+
if (aryText) //多变量输出
|
|
57224
|
+
{
|
|
57225
|
+
var text;
|
|
57226
|
+
for(var k=0;k<aryText.length;++k)
|
|
57227
|
+
{
|
|
57228
|
+
var titleItem=aryText[k];
|
|
57229
|
+
if (titleItem.Name) text=titleItem.Name+":"+titleItem.Text;
|
|
57230
|
+
else text=titleItem.Text;
|
|
57231
|
+
|
|
57232
|
+
var space=this.ParamSpace*GetDevicePixelRatio();
|
|
57233
|
+
var indexTextWidth=this.Canvas.measureText(text).width; //标题+数值长度
|
|
57234
|
+
var textWidth=indexTextWidth;
|
|
57235
|
+
|
|
57236
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
57237
|
+
{
|
|
57238
|
+
var xLeft=left;
|
|
57239
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
57240
|
+
{
|
|
57241
|
+
var outItem=titleItem.TextEx[n];
|
|
57242
|
+
var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;
|
|
57243
|
+
outItem.Width=outTextWidth;
|
|
57244
|
+
outItem.Left=xLeft;
|
|
57245
|
+
|
|
57246
|
+
textWidth+=outTextWidth;
|
|
57247
|
+
xLeft+=outTextWidth;
|
|
57248
|
+
}
|
|
57249
|
+
}
|
|
57250
|
+
|
|
57251
|
+
if ((left+textWidth+space)>right) break;
|
|
57252
|
+
|
|
57253
|
+
if (titleItem.BG) //背景
|
|
57254
|
+
{
|
|
57255
|
+
var textHeight=this.Canvas.measureText("擎").width+2;
|
|
57256
|
+
var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
|
|
57257
|
+
this.Canvas.fillStyle=titleItem.BG;
|
|
57258
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
|
|
57259
|
+
|
|
57260
|
+
this.Canvas.fillStyle=titleItem.Color;
|
|
57261
|
+
this.Canvas.fillText(text,rtBG.Left+1,bottom,indexTextWidth);
|
|
57262
|
+
left+=indexTextWidth;
|
|
57263
|
+
|
|
57264
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
57265
|
+
{
|
|
57266
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
57267
|
+
{
|
|
57268
|
+
var outItem=titleItem.TextEx[n];
|
|
57269
|
+
this.Canvas.fillStyle=outItem.TextColor;
|
|
57270
|
+
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
57271
|
+
left+=outItem.Width;
|
|
57272
|
+
}
|
|
57273
|
+
}
|
|
57274
|
+
|
|
57275
|
+
left+=space;
|
|
57276
|
+
}
|
|
57277
|
+
else
|
|
57278
|
+
{
|
|
57279
|
+
this.Canvas.fillStyle=titleItem.Color;
|
|
57280
|
+
this.Canvas.fillText(text,left,bottom,indexTextWidth);
|
|
57281
|
+
left+=indexTextWidth;
|
|
57282
|
+
|
|
57283
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
57284
|
+
{
|
|
57285
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
57286
|
+
{
|
|
57287
|
+
var outItem=titleItem.TextEx[n];
|
|
57288
|
+
this.Canvas.fillStyle=outItem.TextColor;
|
|
57289
|
+
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
57290
|
+
left+=outItem.Width;
|
|
57291
|
+
}
|
|
57292
|
+
}
|
|
57293
|
+
|
|
57294
|
+
left+=space;
|
|
57295
|
+
}
|
|
57296
|
+
}
|
|
57297
|
+
}
|
|
57298
|
+
else
|
|
57299
|
+
{
|
|
57300
|
+
this.Canvas.fillStyle=item.Color;
|
|
57301
|
+
var text=valueText;
|
|
57302
|
+
if (item.Name)
|
|
57303
|
+
{
|
|
57304
|
+
var dyTitle=this.GetDynamicOutName(item.Name);
|
|
57305
|
+
if (dyTitle) text=dyTitle+":"+valueText;
|
|
57306
|
+
else text=item.Name+":"+valueText;
|
|
57307
|
+
}
|
|
57308
|
+
var space=this.ParamSpace*GetDevicePixelRatio();
|
|
57309
|
+
var textWidth=this.Canvas.measureText(text).width+space;
|
|
57310
|
+
if ((left+textWidth)>right) break;
|
|
57311
|
+
|
|
57312
|
+
this.Canvas.fillText(text,left,bottom,textWidth);
|
|
57313
|
+
left+=textWidth;
|
|
57314
|
+
}
|
|
57315
|
+
}
|
|
57316
|
+
|
|
57317
|
+
rtText.Left=left;
|
|
57318
|
+
}
|
|
57319
|
+
|
|
57320
|
+
//集合竞价
|
|
57321
|
+
this.DrawMainCallAuction=function(positionInfo, rtText, result)
|
|
57322
|
+
{
|
|
57323
|
+
if (!this.IsShowMainIndexTitle) return;
|
|
57324
|
+
if (!this.MainTitlePaint) return;
|
|
57325
|
+
var auctionData=this.MainTitlePaint.GetCurrentAuctionData(); //集合竞价分时数据
|
|
57326
|
+
if (!auctionData || !auctionData.Data) return;
|
|
57327
|
+
if (!this.GetEventCallback) return;
|
|
57328
|
+
|
|
57329
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_CALL_AUCTION_INDEX_TITLE);
|
|
57330
|
+
if (!event) return;
|
|
57331
|
+
|
|
57332
|
+
var data={ AuctionData:auctionData, Data:this.Data, FrameID:this.Frame.Identify, Out:null, PreventDefault:false };
|
|
57333
|
+
event.Callback(event,data,this);
|
|
57334
|
+
result.PreventDefault=data.PreventDefault;
|
|
57335
|
+
|
|
57336
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data.Out)) return;
|
|
57337
|
+
|
|
57338
|
+
var left=positionInfo.Left;
|
|
57339
|
+
var right=positionInfo.Right;
|
|
57340
|
+
var bottom=positionInfo.Bottom;
|
|
57341
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
57342
|
+
|
|
57343
|
+
var aryText=data.Out; //[{Text:, Color, Space:间距 }]
|
|
57344
|
+
for(var i=0; i<aryText.length; ++i)
|
|
57345
|
+
{
|
|
57346
|
+
var item=aryText[i];
|
|
57347
|
+
if (!item.Text) continue;
|
|
57348
|
+
var textWidth=this.Canvas.measureText(item.Text).width+2;
|
|
57349
|
+
if (left+textWidth>right) break;
|
|
57350
|
+
|
|
57351
|
+
if (item.BGColor) //背景
|
|
57352
|
+
{
|
|
57353
|
+
var textHeight=this.Canvas.measureText("擎").width+2;
|
|
57354
|
+
var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
|
|
57355
|
+
this.Canvas.fillStyle=item.BGColor;
|
|
57356
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
|
|
57357
|
+
left+=1;
|
|
57358
|
+
}
|
|
57359
|
+
|
|
57360
|
+
this.Canvas.fillStyle=item.Color;
|
|
57361
|
+
this.Canvas.fillText(item.Text,left,bottom,textWidth);
|
|
57362
|
+
left+=textWidth;
|
|
57363
|
+
|
|
57364
|
+
if (IFrameSplitOperator.IsPlusNumber(item.Space)) left+=item.Space*pixelRatio;
|
|
57365
|
+
}
|
|
57366
|
+
|
|
57367
|
+
rtText.Left=left;
|
|
57368
|
+
}
|
|
57369
|
+
|
|
57370
|
+
this.GetCallAuctionTitleItem=function(item, titleIndex, auctionData)
|
|
57371
|
+
{
|
|
57372
|
+
if (item.IsShow===false) return null;
|
|
57373
|
+
if (item.IsVisible===false) return null;
|
|
57374
|
+
if (!item || !item.Data || !item.Data.Data) return null;
|
|
57375
|
+
|
|
57376
|
+
if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
|
|
57377
|
+
{
|
|
57378
|
+
var find=g_ScriptIndexChartFactory.Get(item.DataType);
|
|
57379
|
+
if (find && find.FormatTitleCallback)
|
|
57380
|
+
return find.FormatTitleCallback(value, item, dataIndex);
|
|
57381
|
+
}
|
|
57382
|
+
}
|
|
57383
|
+
|
|
57255
57384
|
//获取上一个有效数据
|
|
57256
57385
|
this.GetPreVaildItem=function(data, start)
|
|
57257
57386
|
{
|
|
@@ -72570,8 +72699,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72570
72699
|
}
|
|
72571
72700
|
|
|
72572
72701
|
//绑定主图K线数据
|
|
72573
|
-
this.BindMainData=function(hisData,showCount)
|
|
72702
|
+
this.BindMainData=function(hisData, showCount, chartOperator)
|
|
72574
72703
|
{
|
|
72704
|
+
var isShowAll=false; //全部显示
|
|
72705
|
+
if (chartOperator && chartOperator.IsShowAll===true) isShowAll=true;
|
|
72575
72706
|
this.ChartPaint[0].Data=hisData;
|
|
72576
72707
|
this.ChartPaint[0].Symbol=this.Symbol;
|
|
72577
72708
|
|
|
@@ -72592,9 +72723,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72592
72723
|
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
72593
72724
|
{
|
|
72594
72725
|
var item =this.Frame.SubFrame[i].Frame;
|
|
72595
|
-
item.XPointCount=
|
|
72596
|
-
item.
|
|
72726
|
+
if (isShowAll) item.XPointCount=hisData.Data.length+this.RightSpaceCount;
|
|
72727
|
+
else item.XPointCount=showCount+this.RightSpaceCount;
|
|
72597
72728
|
|
|
72729
|
+
item.Data=this.ChartPaint[0].Data;
|
|
72598
72730
|
item.XSplitOperator.Symbol=this.Symbol;
|
|
72599
72731
|
item.XSplitOperator.Period=this.Period;
|
|
72600
72732
|
}
|
|
@@ -72613,17 +72745,25 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72613
72745
|
item.MainData=this.ChartPaint[0].Data;
|
|
72614
72746
|
}
|
|
72615
72747
|
|
|
72616
|
-
|
|
72617
|
-
|
|
72618
|
-
|
|
72619
|
-
|
|
72748
|
+
if (isShowAll)
|
|
72749
|
+
{
|
|
72750
|
+
var dataOffset=0;
|
|
72751
|
+
this.CursorIndex=0;
|
|
72752
|
+
}
|
|
72753
|
+
else
|
|
72754
|
+
{
|
|
72755
|
+
var dataOffset=hisData.Data.length-showCount;
|
|
72756
|
+
if (dataOffset<0) dataOffset=0;
|
|
72757
|
+
this.ChartPaint[0].Data.DataOffset=dataOffset;
|
|
72758
|
+
|
|
72759
|
+
this.CursorIndex=showCount;
|
|
72760
|
+
if (this.CursorIndex+dataOffset>=hisData.Data.length) this.CursorIndex=hisData.Data.length-1-dataOffset;
|
|
72761
|
+
if (this.CursorIndex<0) this.CursorIndex=0; //不一定对啊
|
|
72762
|
+
}
|
|
72620
72763
|
|
|
72764
|
+
this.ChartPaint[0].Period=this.Period;
|
|
72621
72765
|
this.ChartCorssCursor.StringFormatY.Symbol=this.Symbol;
|
|
72622
72766
|
|
|
72623
|
-
this.CursorIndex=showCount;
|
|
72624
|
-
if (this.CursorIndex+dataOffset>=hisData.Data.length) this.CursorIndex=hisData.Data.length-1-dataOffset;
|
|
72625
|
-
if (this.CursorIndex<0) this.CursorIndex=0; //不一定对啊
|
|
72626
|
-
|
|
72627
72767
|
if (this.CustomShow) //定制显示 1次有效
|
|
72628
72768
|
{
|
|
72629
72769
|
this.SetCustomShow(this.CustomShow,hisData);
|
|
@@ -73492,8 +73632,16 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73492
73632
|
//绑定数据
|
|
73493
73633
|
this.Symbol=data.symbol;
|
|
73494
73634
|
this.Name=data.name;
|
|
73635
|
+
|
|
73636
|
+
var chartOperator=null; //额外的图形控制
|
|
73637
|
+
if (data && data.ChartOperator)
|
|
73638
|
+
{
|
|
73639
|
+
var item=data.ChartOperator;
|
|
73640
|
+
chartOperator={ };
|
|
73641
|
+
if (item.IsShowAll===true) chartOperator.IsShowAll=true; //全部显示
|
|
73642
|
+
}
|
|
73495
73643
|
|
|
73496
|
-
this.BindMainData(bindData,this.PageSize);
|
|
73644
|
+
this.BindMainData(bindData,this.PageSize,chartOperator);
|
|
73497
73645
|
if (this.AfterBindMainData) this.AfterBindMainData("RecvMinuteHistoryData");
|
|
73498
73646
|
this.Frame.SetSizeChage(true);
|
|
73499
73647
|
|
|
@@ -80752,6 +80900,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80752
80900
|
titlePaint.LanguageID=this.LanguageID;
|
|
80753
80901
|
titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
80754
80902
|
titlePaint.SelectedChart=this.SelectedChart;
|
|
80903
|
+
titlePaint.MainTitlePaint=this.TitlePaint[0];
|
|
80755
80904
|
this.TitlePaint.push(titlePaint);
|
|
80756
80905
|
}
|
|
80757
80906
|
|
|
@@ -80963,7 +81112,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80963
81112
|
titlePaint.Frame=this.Frame.SubFrame[index].Frame;
|
|
80964
81113
|
titlePaint.Canvas=this.Canvas;
|
|
80965
81114
|
titlePaint.LanguageID=this.LanguageID;
|
|
80966
|
-
titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
81115
|
+
titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
|
|
81116
|
+
titlePaint.MainTitlePaint=this.TitlePaint[0];
|
|
80967
81117
|
this.TitlePaint[index+1]=titlePaint;
|
|
80968
81118
|
|
|
80969
81119
|
this.SetSubFrameOption(subFrame,option);
|
|
@@ -81200,6 +81350,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81200
81350
|
titlePaint.LanguageID=this.LanguageID;
|
|
81201
81351
|
titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
81202
81352
|
titlePaint.SelectedChart=this.SelectedChart;
|
|
81353
|
+
titlePaint.MainTitlePaint=this.TitlePaint[0];
|
|
81203
81354
|
this.TitlePaint[i+1]=titlePaint;
|
|
81204
81355
|
}
|
|
81205
81356
|
|
|
@@ -81286,6 +81437,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81286
81437
|
titlePaint.LanguageID=this.LanguageID;
|
|
81287
81438
|
titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
81288
81439
|
titlePaint.SelectedChart=this.SelectedChart;
|
|
81440
|
+
titlePaint.MainTitlePaint=this.TitlePaint[0];
|
|
81289
81441
|
this.TitlePaint[i+1]=titlePaint;
|
|
81290
81442
|
}
|
|
81291
81443
|
}
|
|
@@ -81939,7 +82091,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81939
82091
|
}
|
|
81940
82092
|
}
|
|
81941
82093
|
|
|
81942
|
-
if (optionChanged)
|
|
82094
|
+
if (optionChanged)
|
|
82095
|
+
{
|
|
82096
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
82097
|
+
this.RequestData();
|
|
82098
|
+
}
|
|
81943
82099
|
}
|
|
81944
82100
|
|
|
81945
82101
|
this.RequestData=function()
|
|
@@ -113707,15 +113863,9 @@ function JSExplainer(ast,option)
|
|
|
113707
113863
|
|
|
113708
113864
|
if (g_JSComplierResource.IsCustomFunction(funcName))
|
|
113709
113865
|
{
|
|
113710
|
-
var
|
|
113711
|
-
node.Out
|
|
113712
|
-
node.
|
|
113713
|
-
|
|
113714
|
-
if (data)
|
|
113715
|
-
{
|
|
113716
|
-
if (data.Out) node.Out=data.Out;
|
|
113717
|
-
if (data.Draw) node.Draw=data.Draw;
|
|
113718
|
-
}
|
|
113866
|
+
var functionInfo=g_JSComplierResource.CustomFunction.Data.get(funcName);
|
|
113867
|
+
if (!functionInfo.Description) node.Out=`自定义函数${funcName}`;
|
|
113868
|
+
else node.Out=functionInfo.Description;
|
|
113719
113869
|
|
|
113720
113870
|
return node.Out;
|
|
113721
113871
|
}
|
|
@@ -114334,7 +114484,12 @@ function JSExplainer(ast,option)
|
|
|
114334
114484
|
return data;
|
|
114335
114485
|
}
|
|
114336
114486
|
|
|
114337
|
-
if (g_JSComplierResource.IsCustomVariant(name))
|
|
114487
|
+
if (g_JSComplierResource.IsCustomVariant(name))
|
|
114488
|
+
{
|
|
114489
|
+
var variantInfo=g_JSComplierResource.CustomVariant.Data.get(name); //读取自定义变量
|
|
114490
|
+
if (variantInfo.Description) return variantInfo.Description;
|
|
114491
|
+
else return name;
|
|
114492
|
+
}
|
|
114338
114493
|
|
|
114339
114494
|
if (this.VarTable.has(name)) return this.VarTable.get(name);
|
|
114340
114495
|
|
|
@@ -132200,7 +132355,7 @@ function ScrollBarBGChart()
|
|
|
132200
132355
|
|
|
132201
132356
|
|
|
132202
132357
|
|
|
132203
|
-
var HQCHART_VERSION="1.1.
|
|
132358
|
+
var HQCHART_VERSION="1.1.13285";
|
|
132204
132359
|
|
|
132205
132360
|
function PrintHQChartVersion()
|
|
132206
132361
|
{
|