hqchart 1.1.15011 → 1.1.15018
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 +250 -223
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +158 -2
- package/src/jscommon/umychart.complier.js +94 -0
- package/src/jscommon/umychart.js +517 -4
- package/src/jscommon/umychart.resource/css/tools.css +25 -0
- package/src/jscommon/umychart.style.js +7 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +619 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +777 -7
|
@@ -4909,12 +4909,27 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4909
4909
|
var item=option.LatestPointFlash;
|
|
4910
4910
|
if (item.Enable)
|
|
4911
4911
|
{
|
|
4912
|
-
|
|
4912
|
+
var zIndex=6;
|
|
4913
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zIndex=item.ZIndex;
|
|
4914
|
+
this.CreateExtraCanvasElement(JSChart.LatestPointFlashKey, { ZIndex:zIndex });
|
|
4913
4915
|
chart.CreateExtendChart("LatestPointFlashPaint", item);
|
|
4914
4916
|
chart.StartLatestPointFlash();
|
|
4915
4917
|
}
|
|
4916
4918
|
}
|
|
4917
4919
|
|
|
4920
|
+
if (option.KLineCountDown)
|
|
4921
|
+
{
|
|
4922
|
+
var item=option.KLineCountDown;
|
|
4923
|
+
if (item.Enable)
|
|
4924
|
+
{
|
|
4925
|
+
var zIndex=4;
|
|
4926
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zIndex=item.ZIndex;
|
|
4927
|
+
this.CreateExtraCanvasElement(JSChart.KLineCountDownKey, { ZIndex:zIndex });
|
|
4928
|
+
chart.CreateExtendChart("KLineCountDownPaint", item);
|
|
4929
|
+
chart.StartCountDown();
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4918
4933
|
return chart;
|
|
4919
4934
|
}
|
|
4920
4935
|
|
|
@@ -5973,6 +5988,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5973
5988
|
if (option.FloatTooltip && option.FloatTooltip.Enable)
|
|
5974
5989
|
chart.InitalFloatTooltip(option.FloatTooltip);
|
|
5975
5990
|
|
|
5991
|
+
if (option.SmallFloatTooltip && option.SmallFloatTooltip.Enable)
|
|
5992
|
+
chart.InitalSmallFloatTooltip(option.SmallFloatTooltip);
|
|
5993
|
+
|
|
5976
5994
|
if (option.SelectRectDialog && option.SelectRectDialog.Enable)
|
|
5977
5995
|
chart.InitalSelectRectDialog(option.SelectRectDialog);
|
|
5978
5996
|
|
|
@@ -6485,6 +6503,7 @@ JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
|
|
|
6485
6503
|
JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
|
|
6486
6504
|
JSChart.RectDragCanvasKey="hqchart_drag_rect";
|
|
6487
6505
|
JSChart.LatestPointFlashKey="hqchart_point_flash"; //最新数据点闪烁
|
|
6506
|
+
JSChart.KLineCountDownKey="hqchart_kline_countdown"; //倒计时
|
|
6488
6507
|
|
|
6489
6508
|
//初始化
|
|
6490
6509
|
JSChart.Init=function(divElement,bScreen,bCacheCanvas)
|
|
@@ -6931,6 +6950,8 @@ var JSCHART_EVENT_ID=
|
|
|
6931
6950
|
ON_REPORT_SHOW_TOOLTIP:175, //报价列表 提示信息\
|
|
6932
6951
|
|
|
6933
6952
|
ON_FORMAT_TVLONGPOSITION_LABEL:176,
|
|
6953
|
+
|
|
6954
|
+
ON_FORMAT_COUNTDOWN_TEXT:177, //倒计时
|
|
6934
6955
|
}
|
|
6935
6956
|
|
|
6936
6957
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7398,7 +7419,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7398
7419
|
this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
|
|
7399
7420
|
this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
|
|
7400
7421
|
|
|
7401
|
-
this.LatestPointFlashOption={ Timer:null, DelayTime:100 };
|
|
7422
|
+
this.LatestPointFlashOption={ Timer:null, DelayTime:100 }; //最后一个数据闪烁
|
|
7423
|
+
this.CountDownOption={ Timer:null, DelayTime:300 }; //倒计时
|
|
7402
7424
|
|
|
7403
7425
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
7404
7426
|
|
|
@@ -7416,6 +7438,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7416
7438
|
this.FloatTooltip; //浮动tooltip信息
|
|
7417
7439
|
this.DialogSearchIndex; //指标搜索
|
|
7418
7440
|
this.DialogModifyIndexParam; //指标参数修改
|
|
7441
|
+
this.SmallFloatTooltipGroup; //小浮框tooltip信息集合
|
|
7419
7442
|
|
|
7420
7443
|
|
|
7421
7444
|
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
@@ -7500,6 +7523,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7500
7523
|
|
|
7501
7524
|
this.GlobalOption.LatestPoint=null;
|
|
7502
7525
|
this.GlobalOption.TradeStatus=null;
|
|
7526
|
+
this.GlobalOption.CountDown=null;
|
|
7503
7527
|
}
|
|
7504
7528
|
|
|
7505
7529
|
this.RestoreFocus=function(delay)
|
|
@@ -7572,6 +7596,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7572
7596
|
this.FloatTooltip.Create();
|
|
7573
7597
|
}
|
|
7574
7598
|
|
|
7599
|
+
|
|
7600
|
+
this.InitalSmallFloatTooltip=function(option)
|
|
7601
|
+
{
|
|
7602
|
+
if (this.SmallFloatTooltipGroup) return;
|
|
7603
|
+
|
|
7604
|
+
this.SmallFloatTooltipGroup=new JSSmallFloatTooltipGroup();
|
|
7605
|
+
this.SmallFloatTooltipGroup.Inital(this, option);
|
|
7606
|
+
this.SmallFloatTooltipGroup.Create();
|
|
7607
|
+
}
|
|
7608
|
+
|
|
7609
|
+
|
|
7575
7610
|
this.InitalModifyDrawDialog=function()
|
|
7576
7611
|
{
|
|
7577
7612
|
if ( this.DialogModifyDraw) return;
|
|
@@ -7749,6 +7784,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7749
7784
|
this.FloatTooltip.Hide();
|
|
7750
7785
|
}
|
|
7751
7786
|
|
|
7787
|
+
this.HideSmallFloatTooltip=function()
|
|
7788
|
+
{
|
|
7789
|
+
if (!this.SmallFloatTooltipGroup) return;
|
|
7790
|
+
|
|
7791
|
+
this.SmallFloatTooltipGroup.Hide();
|
|
7792
|
+
}
|
|
7793
|
+
|
|
7752
7794
|
this.DestroyTooltipDialog=function()
|
|
7753
7795
|
{
|
|
7754
7796
|
if (!this.DialogTooltip) return;
|
|
@@ -7765,6 +7807,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7765
7807
|
this.FloatTooltip=null;
|
|
7766
7808
|
}
|
|
7767
7809
|
|
|
7810
|
+
this.DestroySmallFloatTooltip=function()
|
|
7811
|
+
{
|
|
7812
|
+
if (!this.SmallFloatTooltipGroup) return;
|
|
7813
|
+
|
|
7814
|
+
this.SmallFloatTooltipGroup.Destroy();
|
|
7815
|
+
this.SmallFloatTooltipGroup=null;
|
|
7816
|
+
}
|
|
7817
|
+
|
|
7768
7818
|
this.DestroySearchIndexDialog=function()
|
|
7769
7819
|
{
|
|
7770
7820
|
if (!this.DialogSearchIndex) return;
|
|
@@ -7818,6 +7868,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7818
7868
|
{
|
|
7819
7869
|
this.HideFloatTooltip();
|
|
7820
7870
|
this.CloseTooltipDialog();
|
|
7871
|
+
this.HideSmallFloatTooltip();
|
|
7821
7872
|
|
|
7822
7873
|
if (this.DialogDrawTool) this.DialogDrawTool.Close();
|
|
7823
7874
|
this.CloseModifyDrawDialog();
|
|
@@ -7907,6 +7958,30 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7907
7958
|
chart.FlashCount=flashCount;
|
|
7908
7959
|
}
|
|
7909
7960
|
|
|
7961
|
+
this.StartCountDown=function()
|
|
7962
|
+
{
|
|
7963
|
+
this.CountDownOption.Timer=setInterval(()=>
|
|
7964
|
+
{
|
|
7965
|
+
this.DrawCountDown();
|
|
7966
|
+
}, this.CountDownOption.DelayTime);
|
|
7967
|
+
}
|
|
7968
|
+
|
|
7969
|
+
this.DrawCountDown=function()
|
|
7970
|
+
{
|
|
7971
|
+
var finder=this.GetExtendChartByClassName("KLineCountDownPaint");
|
|
7972
|
+
if (finder && finder.Chart)
|
|
7973
|
+
finder.Chart.Draw();
|
|
7974
|
+
}
|
|
7975
|
+
|
|
7976
|
+
this.StopCountDown=function()
|
|
7977
|
+
{
|
|
7978
|
+
if (this.CountDownOption.Timer)
|
|
7979
|
+
{
|
|
7980
|
+
clearInterval(this.CountDownOption.Timer);
|
|
7981
|
+
this.CountDownOption.Timer=null;
|
|
7982
|
+
}
|
|
7983
|
+
}
|
|
7984
|
+
|
|
7910
7985
|
this.ChartDestroy=function() //销毁
|
|
7911
7986
|
{
|
|
7912
7987
|
this.IsDestroy=true;
|
|
@@ -7914,6 +7989,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7914
7989
|
|
|
7915
7990
|
this.DestroyTooltipDialog();
|
|
7916
7991
|
this.DestroyFloatTooltip();
|
|
7992
|
+
this.DestroySmallFloatTooltip();
|
|
7917
7993
|
|
|
7918
7994
|
this.DestroySearchIndexDialog();
|
|
7919
7995
|
this.DestroyDialogModifyIndexParam();
|
|
@@ -7928,6 +8004,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7928
8004
|
if (this.DestroyPopMinuteChart) this.DestroyPopMinuteChart();
|
|
7929
8005
|
|
|
7930
8006
|
this.StopLatestPointFlash();
|
|
8007
|
+
this.StopCountDown();
|
|
7931
8008
|
|
|
7932
8009
|
document.oncontextmenu=null;
|
|
7933
8010
|
this.RemoveAllEventListener();
|
|
@@ -11370,6 +11447,49 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11370
11447
|
return null;
|
|
11371
11448
|
}
|
|
11372
11449
|
|
|
11450
|
+
this.GetCorssCursorTooltipData=function(option)
|
|
11451
|
+
{
|
|
11452
|
+
if (!this.ChartCorssCursor) return null;
|
|
11453
|
+
if (this.ChartCorssCursor.Status===0) return null;
|
|
11454
|
+
|
|
11455
|
+
var kItem=this.ChartCorssCursor.StringFormatX.KItem;
|
|
11456
|
+
if (!kItem) return null;
|
|
11457
|
+
|
|
11458
|
+
//X轴取十字光标坐标
|
|
11459
|
+
var toolTip={ AryData:[], X:this.ChartCorssCursor.StringFormatX.Point.X };
|
|
11460
|
+
|
|
11461
|
+
for(var i=0;i<this.ChartPaint.length;++i)
|
|
11462
|
+
{
|
|
11463
|
+
var item=this.ChartPaint[i];
|
|
11464
|
+
if (!item.GetCorssCursorTooltipData) continue;
|
|
11465
|
+
|
|
11466
|
+
item.GetCorssCursorTooltipData(kItem, toolTip);
|
|
11467
|
+
}
|
|
11468
|
+
|
|
11469
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame))
|
|
11470
|
+
{
|
|
11471
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
11472
|
+
{
|
|
11473
|
+
var subFrame=this.Frame.SubFrame[i];
|
|
11474
|
+
for(var j=0;j<subFrame.OverlayIndex.length;++j)
|
|
11475
|
+
{
|
|
11476
|
+
var overlayItem=subFrame.OverlayIndex[j];
|
|
11477
|
+
for(var k=0;k<overlayItem.ChartPaint.length;++k)
|
|
11478
|
+
{
|
|
11479
|
+
var item=overlayItem.ChartPaint[k];
|
|
11480
|
+
if (!item.GetCorssCursorTooltipData) continue;
|
|
11481
|
+
|
|
11482
|
+
item.GetCorssCursorTooltipData(kItem, toolTip);
|
|
11483
|
+
}
|
|
11484
|
+
}
|
|
11485
|
+
}
|
|
11486
|
+
}
|
|
11487
|
+
|
|
11488
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(toolTip.AryData)) return null;
|
|
11489
|
+
|
|
11490
|
+
return toolTip;
|
|
11491
|
+
}
|
|
11492
|
+
|
|
11373
11493
|
this.PtInExtendChartButtons=function(x,y)
|
|
11374
11494
|
{
|
|
11375
11495
|
for(var i=0;i<this.ExtendChartPaint.length; ++i)
|
|
@@ -11683,6 +11803,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11683
11803
|
}
|
|
11684
11804
|
}
|
|
11685
11805
|
|
|
11806
|
+
var corssTooltipData=this.GetCorssCursorTooltipData(null);
|
|
11807
|
+
if (corssTooltipData) this.DrawSmallFloatTooltip(corssTooltipData);
|
|
11808
|
+
else this.HideSmallFloatTooltip();
|
|
11809
|
+
|
|
11686
11810
|
this.SetCursor(mouseStatus);
|
|
11687
11811
|
}
|
|
11688
11812
|
|
|
@@ -12407,6 +12531,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12407
12531
|
|
|
12408
12532
|
this.ShowTooltipByKeyDown=function()
|
|
12409
12533
|
{
|
|
12534
|
+
var corssTooltipData=this.GetCorssCursorTooltipData(null);
|
|
12535
|
+
if (corssTooltipData) this.DrawSmallFloatTooltip(corssTooltipData);
|
|
12536
|
+
else this.HideSmallFloatTooltip();
|
|
12537
|
+
|
|
12410
12538
|
if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown)
|
|
12411
12539
|
{
|
|
12412
12540
|
this.HideFloatTooltip();
|
|
@@ -12425,7 +12553,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12425
12553
|
var kItem=kData.Data[dataIndex];
|
|
12426
12554
|
if (!kItem) return;
|
|
12427
12555
|
|
|
12428
|
-
var data=this.Frame.Data;
|
|
12429
12556
|
var toolTip=new TooltipData();
|
|
12430
12557
|
toolTip.Data=kItem;
|
|
12431
12558
|
toolTip.ChartPaint=this.ChartPaint[0];
|
|
@@ -12793,6 +12920,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12793
12920
|
if (this.Tooltip.style.display!="none") this.Tooltip.style.display = "none";
|
|
12794
12921
|
|
|
12795
12922
|
this.HideFloatTooltip();
|
|
12923
|
+
this.HideSmallFloatTooltip();
|
|
12924
|
+
}
|
|
12925
|
+
|
|
12926
|
+
this.DrawSmallFloatTooltip=function(toolTip)
|
|
12927
|
+
{
|
|
12928
|
+
if (!this.SmallFloatTooltipGroup) return;
|
|
12929
|
+
|
|
12930
|
+
this.UpdateSmallFloatTooltip(toolTip)
|
|
12931
|
+
}
|
|
12932
|
+
|
|
12933
|
+
this.UpdateSmallFloatTooltip=function(toolTip)
|
|
12934
|
+
{
|
|
12935
|
+
if (!this.SmallFloatTooltipGroup) return;
|
|
12936
|
+
|
|
12937
|
+
var sendData=
|
|
12938
|
+
{
|
|
12939
|
+
Tooltip:toolTip,
|
|
12940
|
+
Symbol:this.Symbol,
|
|
12941
|
+
Name:this.Name,
|
|
12942
|
+
DataType:1,
|
|
12943
|
+
};
|
|
12944
|
+
|
|
12945
|
+
this.SmallFloatTooltipGroup.Update(sendData);
|
|
12796
12946
|
}
|
|
12797
12947
|
|
|
12798
12948
|
this.UpdateSelectRect=function(start,end)
|
|
@@ -51590,6 +51740,69 @@ function ChartStackedBar()
|
|
|
51590
51740
|
|
|
51591
51741
|
}
|
|
51592
51742
|
|
|
51743
|
+
//绘制随光标移动的浮动文字。
|
|
51744
|
+
//用法:DRAWFLAGTEXT(COND,PRICE,TEXT),光标处当COND条件满足时,在PRICE位置用半透明窗口显示文字TEXT,随光标移动而移动。将\\n插入TEXT内容中可实现文字换行。
|
|
51745
|
+
//例如:DRAWFLAGTEXT(CLOSE/OPEN>1.08,LOW,'大阳线')表示当光标移动到涨幅大于8%的地方,在最低价位置显示'大阳线'字样的浮动窗口。
|
|
51746
|
+
function ChartDrawFlagText()
|
|
51747
|
+
{
|
|
51748
|
+
this.newMethod=IChartPainting; //派生
|
|
51749
|
+
this.newMethod();
|
|
51750
|
+
delete this.newMethod;
|
|
51751
|
+
|
|
51752
|
+
this.ClassName="ChartDrawFlagText";
|
|
51753
|
+
|
|
51754
|
+
this.MapCache=null; //key=date/date-time value={ Date:, Time:, Data:[ ] }
|
|
51755
|
+
this.AryData=[];
|
|
51756
|
+
|
|
51757
|
+
this.GetKValue=ChartData.GetKValue;
|
|
51758
|
+
this.BuildCacheData=function()
|
|
51759
|
+
{
|
|
51760
|
+
var mapData=new Map();
|
|
51761
|
+
this.MapCache=mapData;
|
|
51762
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
51763
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryData)) return;
|
|
51764
|
+
|
|
51765
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
51766
|
+
{
|
|
51767
|
+
var item=this.AryData[i];
|
|
51768
|
+
if (!item) continue;
|
|
51769
|
+
|
|
51770
|
+
var kItem=this.Data.Data[i];
|
|
51771
|
+
item.Date=kItem.Date;
|
|
51772
|
+
item.Time=kItem.Time;
|
|
51773
|
+
|
|
51774
|
+
var key=this.BuildKey(kItem);
|
|
51775
|
+
mapData.set(key, item);
|
|
51776
|
+
}
|
|
51777
|
+
}
|
|
51778
|
+
|
|
51779
|
+
this.Draw=function()
|
|
51780
|
+
{
|
|
51781
|
+
|
|
51782
|
+
}
|
|
51783
|
+
|
|
51784
|
+
this.GetCorssCursorTooltipData=function(kItem, tooltip)
|
|
51785
|
+
{
|
|
51786
|
+
if (!kItem) return null;
|
|
51787
|
+
if (!this.MapCache) return null;
|
|
51788
|
+
|
|
51789
|
+
var key=this.BuildKey(kItem);
|
|
51790
|
+
if (!this.MapCache.has(key)) return null;
|
|
51791
|
+
|
|
51792
|
+
var item=this.MapCache.get(key);
|
|
51793
|
+
if (item.YValue>this.ChartFrame.HorizontalMax || item.YValue<this.ChartFrame.HorizontalMin) return null;
|
|
51794
|
+
|
|
51795
|
+
var y=this.ChartFrame.GetYFromData(item.YValue,false);
|
|
51796
|
+
tooltip.AryData.push({ Data:item, Y:y, ChartPaint:this, Type:1 });
|
|
51797
|
+
return item;
|
|
51798
|
+
}
|
|
51799
|
+
|
|
51800
|
+
this.GetMaxMin=function()
|
|
51801
|
+
{
|
|
51802
|
+
return {Min:null, Max:null};
|
|
51803
|
+
}
|
|
51804
|
+
}
|
|
51805
|
+
|
|
51593
51806
|
//锁 支持横屏
|
|
51594
51807
|
function ChartLock()
|
|
51595
51808
|
{
|
|
@@ -52018,7 +52231,8 @@ function ExtendChartPaintFactory()
|
|
|
52018
52231
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
52019
52232
|
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
52020
52233
|
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}],
|
|
52021
|
-
["LatestPointFlashPaint", {Create:function() { return new LatestPointFlashPaint(); }}]
|
|
52234
|
+
["LatestPointFlashPaint", {Create:function() { return new LatestPointFlashPaint(); }}],
|
|
52235
|
+
["KLineCountDownPaint", { Create:function(){ return new KLineCountDownPaint(); }}]
|
|
52022
52236
|
]
|
|
52023
52237
|
);
|
|
52024
52238
|
|
|
@@ -56760,6 +56974,238 @@ function LatestPointFlashPaint()
|
|
|
56760
56974
|
}
|
|
56761
56975
|
}
|
|
56762
56976
|
|
|
56977
|
+
|
|
56978
|
+
//K线倒计时
|
|
56979
|
+
function KLineCountDownPaint()
|
|
56980
|
+
{
|
|
56981
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
56982
|
+
this.newMethod();
|
|
56983
|
+
delete this.newMethod;
|
|
56984
|
+
|
|
56985
|
+
this.ClassName='KLineCountDownPaint';
|
|
56986
|
+
this.HQChart;
|
|
56987
|
+
this.CanvasEx;
|
|
56988
|
+
this.Frequency=500; //闪烁频率ms
|
|
56989
|
+
this.Font=g_JSChartResource.KLineCountDownPaint.Font;
|
|
56990
|
+
this.PriceColor=g_JSChartResource.KLineCountDownPaint.PriceColor;
|
|
56991
|
+
this.TimeColor=g_JSChartResource.KLineCountDownPaint.TimeColor;
|
|
56992
|
+
|
|
56993
|
+
this.TextMargin=CloneData(g_JSChartResource.KLineCountDownPaint.TextMargin);
|
|
56994
|
+
this.LabelMargin=CloneData(g_JSChartResource.KLineCountDownPaint.LabelMargin);
|
|
56995
|
+
this.LineConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Line); //{ IsShow:true, Width:1, Dash:[3,4] };
|
|
56996
|
+
|
|
56997
|
+
this.UnchangeConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Unchange);
|
|
56998
|
+
this.UpConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Up);
|
|
56999
|
+
this.DownConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Down);
|
|
57000
|
+
|
|
57001
|
+
//临时使用
|
|
57002
|
+
this.MainFrame;
|
|
57003
|
+
this.LastItem;
|
|
57004
|
+
|
|
57005
|
+
this.SetOption=function(option)
|
|
57006
|
+
{
|
|
57007
|
+
if (this.HQChart)
|
|
57008
|
+
{
|
|
57009
|
+
var extraElement=this.HQChart.GetExtraCanvas(JSChart.KLineCountDownKey);
|
|
57010
|
+
if (extraElement && extraElement.Canvas) this.CanvasEx=extraElement.Canvas; //绑定独立的画布
|
|
57011
|
+
}
|
|
57012
|
+
|
|
57013
|
+
if (option)
|
|
57014
|
+
{
|
|
57015
|
+
if (IFrameSplitOperator.IsNumber(option.Frequency)) this.Frequency=option.Frequency;
|
|
57016
|
+
if (option.TextMargin) CopyMarginConfig(option.TextMargin, this.TextMargin);
|
|
57017
|
+
if (option.LabelMargin) CopyMarginConfig(option.LabelMargin, this.LabelMargin);
|
|
57018
|
+
if (option.UnchangeColor) this.UnchangeColor=option.UnchangeColor;
|
|
57019
|
+
if (option.UpColor) this.UpColor=option.UpColor;
|
|
57020
|
+
if (option.DownColor) this.DownColor=option.DownColor;
|
|
57021
|
+
|
|
57022
|
+
if (option.Line)
|
|
57023
|
+
{
|
|
57024
|
+
var item=option.Line;
|
|
57025
|
+
if (IFrameSplitOperator.IsBool(item.IsShow)) this.LineConfig.IsShow=item.IsShow;
|
|
57026
|
+
if (IFrameSplitOperator.IsNumber(item.Width)) this.LineConfig.Width=item.Width;
|
|
57027
|
+
if (item.Dash) this.LineConfig.Dash=item.Dash;
|
|
57028
|
+
}
|
|
57029
|
+
}
|
|
57030
|
+
}
|
|
57031
|
+
|
|
57032
|
+
this.ReloadResource=function(resource)
|
|
57033
|
+
{
|
|
57034
|
+
this.Font=g_JSChartResource.KLineCountDownPaint.Font;
|
|
57035
|
+
this.PriceColor=g_JSChartResource.KLineCountDownPaint.PriceColor;
|
|
57036
|
+
this.TimeColor=g_JSChartResource.KLineCountDownPaint.TimeColor;
|
|
57037
|
+
|
|
57038
|
+
this.TextMargin=CloneData(g_JSChartResource.KLineCountDownPaint.TextMargin);
|
|
57039
|
+
this.LabelMargin=CloneData(g_JSChartResource.KLineCountDownPaint.LabelMargin);
|
|
57040
|
+
this.LineConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Line); //{ IsShow:true, Width:1, Dash:[3,4] };
|
|
57041
|
+
|
|
57042
|
+
this.UnchangeConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Unchange);
|
|
57043
|
+
this.UpConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Up);
|
|
57044
|
+
this.DownConfig=CloneData(g_JSChartResource.KLineCountDownPaint.Down);
|
|
57045
|
+
}
|
|
57046
|
+
|
|
57047
|
+
this.Draw=function()
|
|
57048
|
+
{
|
|
57049
|
+
this.MainFrame=null;
|
|
57050
|
+
this.LastItem=null;
|
|
57051
|
+
|
|
57052
|
+
if (!this.HQChart) return;
|
|
57053
|
+
if (!this.CanvasEx) return;
|
|
57054
|
+
this.HQChart.ClearCanvas(this.CanvasEx);
|
|
57055
|
+
var kData=this.HQChart.GetKData();
|
|
57056
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
|
|
57057
|
+
|
|
57058
|
+
var lastItem=kData.Data[kData.Data.length-1];
|
|
57059
|
+
if (!lastItem || !IFrameSplitOperator.IsNumber(lastItem.Close)) return;
|
|
57060
|
+
var frame=this.ChartFrame.SubFrame[0].Frame;
|
|
57061
|
+
if (!frame) return;
|
|
57062
|
+
var price=lastItem.Close;
|
|
57063
|
+
if (price>frame.HorizontalMax || price<frame.HorizontalMin) return;
|
|
57064
|
+
|
|
57065
|
+
if (frame.IsHScreen) return;
|
|
57066
|
+
|
|
57067
|
+
this.MainFrame=frame;
|
|
57068
|
+
this.LastItem=lastItem;
|
|
57069
|
+
|
|
57070
|
+
this.CanvasEx.save();
|
|
57071
|
+
this.DrawDownPaint();
|
|
57072
|
+
this.CanvasEx.restore();
|
|
57073
|
+
|
|
57074
|
+
this.MainFrame=null;
|
|
57075
|
+
this.LastItem=null;
|
|
57076
|
+
//if (!this.HQChart.GlobalOption || !this.HQChart.GlobalOption.CountDown) return;
|
|
57077
|
+
}
|
|
57078
|
+
|
|
57079
|
+
this.DrawDownPaint=function()
|
|
57080
|
+
{
|
|
57081
|
+
if (!this.MainFrame || !this.LastItem || !IFrameSplitOperator.IsNumber(this.LastItem.Close)) return;
|
|
57082
|
+
|
|
57083
|
+
var decNum=GetfloatPrecision(this.HQChart.Symbol); //小数位数
|
|
57084
|
+
var yPrice=this.MainFrame.GetYFromData(this.LastItem.Close,false);
|
|
57085
|
+
var strPrice=this.LastItem.Close.toFixed(decNum);
|
|
57086
|
+
|
|
57087
|
+
var config=this.GetColorConfig(this.LastItem);
|
|
57088
|
+
var out={ BGColor:config.BGColor, Font:this.Font, AryText:[ ], YPrice:yPrice };
|
|
57089
|
+
|
|
57090
|
+
var item={ Text:strPrice, Color:config.PriceColor };
|
|
57091
|
+
out.AryText.push(item);
|
|
57092
|
+
|
|
57093
|
+
var item={ Text:"--:--", Color:config.TimeColor};
|
|
57094
|
+
out.AryText.push(item);
|
|
57095
|
+
|
|
57096
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_COUNTDOWN_TEXT);
|
|
57097
|
+
if (event && event.Callback)
|
|
57098
|
+
{
|
|
57099
|
+
var sendData={ LastItem:this.LastItem, Frame:this.MainFrame, Out:out, Period:this.HQChart.Period, Symbol:this.HQChart.Symbol };
|
|
57100
|
+
event.Callback(event, sendData, this);
|
|
57101
|
+
}
|
|
57102
|
+
|
|
57103
|
+
if (!this.CalculateLableSize(out)) return;
|
|
57104
|
+
|
|
57105
|
+
this.DrawLable(out);
|
|
57106
|
+
}
|
|
57107
|
+
|
|
57108
|
+
this.CalculateLableSize=function(out)
|
|
57109
|
+
{
|
|
57110
|
+
if (!out || !IFrameSplitOperator.IsNonEmptyArray(out.AryText)) return false;
|
|
57111
|
+
|
|
57112
|
+
this.CanvasEx.font=this.Font;
|
|
57113
|
+
this.FontHeight=this.CanvasEx.measureText("O").width; //行高
|
|
57114
|
+
|
|
57115
|
+
var lableWidth=0, lableHeight=0
|
|
57116
|
+
for(var i=0; i<out.AryText.length; ++i)
|
|
57117
|
+
{
|
|
57118
|
+
var item=out.AryText[i];
|
|
57119
|
+
if (!item || !item.Text) continue;
|
|
57120
|
+
item.TextWidth=this.CanvasEx.measureText(item.Text).width;
|
|
57121
|
+
item.TextWidth+=this.TextMargin.Left+this.TextMargin.Right;
|
|
57122
|
+
|
|
57123
|
+
if (lableWidth<item.TextWidth) lableWidth=item.TextWidth;
|
|
57124
|
+
lableHeight+=this.FontHeight+this.TextMargin.Top+this.TextMargin.Bottom;
|
|
57125
|
+
}
|
|
57126
|
+
|
|
57127
|
+
out.Width=lableWidth+this.LabelMargin.Left+this.LabelMargin.Right;
|
|
57128
|
+
out.Height=lableHeight+this.LabelMargin.Top+this.LabelMargin.Bottom;
|
|
57129
|
+
|
|
57130
|
+
return true;
|
|
57131
|
+
}
|
|
57132
|
+
|
|
57133
|
+
this.FixedRect=function(rt)
|
|
57134
|
+
{
|
|
57135
|
+
rt.Left=ToFixedRect(rt.Left);
|
|
57136
|
+
rt.Top=ToFixedRect(rt.Top);
|
|
57137
|
+
rt.Width=ToFixedRect(rt.Width);
|
|
57138
|
+
rt.Height=ToFixedRect(rt.Height);
|
|
57139
|
+
|
|
57140
|
+
rt.Right=rt.Left+rt.Width;
|
|
57141
|
+
rt.Bottom=rt.Top+rt.Height;
|
|
57142
|
+
}
|
|
57143
|
+
|
|
57144
|
+
this.DrawLable=function(out)
|
|
57145
|
+
{
|
|
57146
|
+
if (!out || !IFrameSplitOperator.IsNonEmptyArray(out.AryText)) return;
|
|
57147
|
+
|
|
57148
|
+
var border=this.MainFrame.GetBorder();
|
|
57149
|
+
var chartBorder=this.MainFrame.ChartBorder;
|
|
57150
|
+
var lineHeight=this.FontHeight+this.TextMargin.Top+this.TextMargin.Bottom;
|
|
57151
|
+
if (chartBorder.Right>10 ) //外部刻度
|
|
57152
|
+
{
|
|
57153
|
+
var rtBG={ Left:border.Right, Top:out.YPrice-lineHeight/2, Width:out.Width, Height:out.Height };
|
|
57154
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
57155
|
+
if (rtBG.Right>border.ChartWidth)
|
|
57156
|
+
{
|
|
57157
|
+
rtBG.Right=border.ChartWidth-1;
|
|
57158
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
57159
|
+
}
|
|
57160
|
+
|
|
57161
|
+
this.FixedRect(rtBG);
|
|
57162
|
+
this.CanvasEx.fillStyle=out.BGColor;
|
|
57163
|
+
this.CanvasEx.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
57164
|
+
}
|
|
57165
|
+
|
|
57166
|
+
this.Canvas.textAlign = "left";
|
|
57167
|
+
this.Canvas.textBaseline = "bottom";
|
|
57168
|
+
var yText=rtBG.Top+lineHeight+this.LabelMargin.Top;
|
|
57169
|
+
var xText=rtBG.Left+this.TextMargin.Left+this.LabelMargin.Left;
|
|
57170
|
+
for(var i=0;i<out.AryText.length;++i)
|
|
57171
|
+
{
|
|
57172
|
+
var item=out.AryText[i];
|
|
57173
|
+
var yOffset=this.TextMargin.YOffset;
|
|
57174
|
+
|
|
57175
|
+
this.CanvasEx.fillStyle=item.Color;
|
|
57176
|
+
this.CanvasEx.fillText(item.Text, xText, yText+yOffset-this.TextMargin.Bottom);
|
|
57177
|
+
|
|
57178
|
+
yText+=lineHeight;
|
|
57179
|
+
}
|
|
57180
|
+
|
|
57181
|
+
//线段
|
|
57182
|
+
var config=this.LineConfig;
|
|
57183
|
+
if (config.IsShow)
|
|
57184
|
+
{
|
|
57185
|
+
this.CanvasEx.strokeStyle=out.BGColor;
|
|
57186
|
+
this.CanvasEx.lineWidth=config.Width;
|
|
57187
|
+
if (IFrameSplitOperator.IsNonEmptyArray(config.Dash)) this.CanvasEx.setLineDash(config.Dash);
|
|
57188
|
+
this.CanvasEx.beginPath();
|
|
57189
|
+
var xLeft=border.LeftEx;
|
|
57190
|
+
var xRight=rtBG.Left;
|
|
57191
|
+
this.CanvasEx.moveTo(xLeft,ToFixedPoint(out.YPrice));
|
|
57192
|
+
this.CanvasEx.lineTo(xRight,ToFixedPoint(out.YPrice));
|
|
57193
|
+
this.CanvasEx.stroke();
|
|
57194
|
+
}
|
|
57195
|
+
}
|
|
57196
|
+
|
|
57197
|
+
this.GetColorConfig=function(kItem, symbol)
|
|
57198
|
+
{
|
|
57199
|
+
var config=this.UnchangeConfig;
|
|
57200
|
+
if (!kItem) return config;
|
|
57201
|
+
|
|
57202
|
+
if (kItem.Close>kItem.YClose) config=this.UpConfig;
|
|
57203
|
+
else if (kItem.Close<kItem.YClose) config=this.DownConfig;
|
|
57204
|
+
|
|
57205
|
+
return config;
|
|
57206
|
+
}
|
|
57207
|
+
}
|
|
57208
|
+
|
|
56763
57209
|
//拖拽效果图
|
|
56764
57210
|
var JSCHART_DRAGCHART_TYPE_ID=
|
|
56765
57211
|
{
|
|
@@ -81543,6 +81989,18 @@ function JSChartResource()
|
|
|
81543
81989
|
SplitLine:{ Color:'rgb(73,133,231)', Width:1*GetDevicePixelRatio(), Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()] }
|
|
81544
81990
|
}
|
|
81545
81991
|
|
|
81992
|
+
this.KLineCountDownPaint=
|
|
81993
|
+
{
|
|
81994
|
+
Font:`${14*GetDevicePixelRatio()}px 微软雅黑`,
|
|
81995
|
+
TextMargin:{ Left:0, Right:0, Bottom:2, Top:2, YOffset:0 },
|
|
81996
|
+
LabelMargin:{ Left:5, Right:5, Bottom:4, Top:2 },
|
|
81997
|
+
Line:{ IsShow:true, Width:1, Dash:[5*GetDevicePixelRatio(), 5*GetDevicePixelRatio()] },
|
|
81998
|
+
|
|
81999
|
+
Unchange:{ BGColor:"rgb(0,0,0)", PriceColor:"rgb(250,250,250)", TimeColor:"rgb(190,190,190)" },
|
|
82000
|
+
Up:{ BGColor:"rgb(238,21,21)", PriceColor:"rgb(250,250,250)", TimeColor:"rgb(190,190,190)" },
|
|
82001
|
+
Down:{ BGColor:"rgb(25,158,0)", PriceColor:"rgb(250,250,250)", TimeColor:"rgb(190,190,190)" },
|
|
82002
|
+
}
|
|
82003
|
+
|
|
81546
82004
|
|
|
81547
82005
|
//成交明细
|
|
81548
82006
|
this.DealList=
|
|
@@ -82875,6 +83333,61 @@ function JSChartResource()
|
|
|
82875
83333
|
if (style.ChartScatterPlotV2) this.SetChartScatterPlotV2(style.ChartScatterPlotV2);
|
|
82876
83334
|
|
|
82877
83335
|
if (style.ChartDrawTVLongPosition) this.SetChartDrawTVLongPosition(style.ChartDrawTVLongPosition);
|
|
83336
|
+
if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
|
|
83337
|
+
}
|
|
83338
|
+
|
|
83339
|
+
|
|
83340
|
+
this.SetKLineCountDownPaint=function(style)
|
|
83341
|
+
{
|
|
83342
|
+
var dest=this.KLineCountDownPaint;
|
|
83343
|
+
if (style.Font) dest.Font=style.Font;
|
|
83344
|
+
|
|
83345
|
+
if (style.TextMargin)
|
|
83346
|
+
{
|
|
83347
|
+
var item=style.TextMargin;
|
|
83348
|
+
CopyMarginConfig(dest.TextMargin, item);
|
|
83349
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.TextMargin.YOffset=item.YOffset;
|
|
83350
|
+
}
|
|
83351
|
+
|
|
83352
|
+
if (style.LabelMargin) CopyMarginConfig(dest.LabelMargin, style.LabelMargin);
|
|
83353
|
+
|
|
83354
|
+
if (style.Line)
|
|
83355
|
+
{
|
|
83356
|
+
var item=style.Line;
|
|
83357
|
+
if (IFrameSplitOperator.IsNumber(item.Width)) dest.Line.Width=item.Width;
|
|
83358
|
+
if (IFrameSplitOperator.IsBool(item.IsShow)) dest.Line.Width=item.Width;
|
|
83359
|
+
if (item.Dash) dest.Line.Dash=item.Dash;
|
|
83360
|
+
}
|
|
83361
|
+
|
|
83362
|
+
if (style.Unchange)
|
|
83363
|
+
{
|
|
83364
|
+
var item=style.Unchange;
|
|
83365
|
+
var subDest=dest.Unchange;
|
|
83366
|
+
|
|
83367
|
+
if (item.BGColor) subDest.BGColor=item.BGColor;
|
|
83368
|
+
if (item.PriceColor) subDest.PriceColor=item.PriceColor;
|
|
83369
|
+
if (item.TimeColor) subDest.TimeColor=item.TimeColor;
|
|
83370
|
+
}
|
|
83371
|
+
|
|
83372
|
+
if (style.Up)
|
|
83373
|
+
{
|
|
83374
|
+
var item=style.Up;
|
|
83375
|
+
var subDest=dest.Up;
|
|
83376
|
+
|
|
83377
|
+
if (item.BGColor) subDest.BGColor=item.BGColor;
|
|
83378
|
+
if (item.PriceColor) subDest.PriceColor=item.PriceColor;
|
|
83379
|
+
if (item.TimeColor) subDest.TimeColor=item.TimeColor;
|
|
83380
|
+
}
|
|
83381
|
+
|
|
83382
|
+
if (style.Down)
|
|
83383
|
+
{
|
|
83384
|
+
var item=style.Down;
|
|
83385
|
+
var subDest=dest.Down;
|
|
83386
|
+
|
|
83387
|
+
if (item.BGColor) subDest.BGColor=item.BGColor;
|
|
83388
|
+
if (item.PriceColor) subDest.PriceColor=item.PriceColor;
|
|
83389
|
+
if (item.TimeColor) subDest.TimeColor=item.TimeColor;
|
|
83390
|
+
}
|
|
82878
83391
|
}
|
|
82879
83392
|
|
|
82880
83393
|
|
|
@@ -117984,6 +118497,55 @@ function JSDraw(errorHandler,symbolData)
|
|
|
117984
118497
|
this.ErrorHandler=errorHandler;
|
|
117985
118498
|
this.SymbolData=symbolData;
|
|
117986
118499
|
|
|
118500
|
+
//绘制随光标移动的浮动文字。
|
|
118501
|
+
//用法: DRAWFLAGTEXT(COND,PRICE,TEXT),光标处当COND条件满足时,在PRICE位置用半透明窗口显示文字TEXT,随光标移动而移动。将\\n插入TEXT内容中可实现文字换行。
|
|
118502
|
+
//例如:DRAWFLAGTEXT(CLOSE/OPEN>1.08,LOW,'大阳线')表示当光标移动到涨幅大于8%的地方,在最低价位置显示'大阳线'字样的浮动窗口。
|
|
118503
|
+
this.DRAWFLAGTEXT=function(condition,price,text)
|
|
118504
|
+
{
|
|
118505
|
+
var drawData=[];
|
|
118506
|
+
var result={ DrawData:drawData, DrawType:'DRAWFLAGTEXT' };
|
|
118507
|
+
if (!text) return result;
|
|
118508
|
+
|
|
118509
|
+
if (Array.isArray(condition))
|
|
118510
|
+
{
|
|
118511
|
+
if (condition.length<=0) return result;
|
|
118512
|
+
|
|
118513
|
+
var bSinglePrice=IFrameSplitOperator.IsNumber(price);
|
|
118514
|
+
for(var i=0; i<condition.length; ++i)
|
|
118515
|
+
{
|
|
118516
|
+
drawData[i]=null;
|
|
118517
|
+
|
|
118518
|
+
if (isNaN(condition[i]) || !condition[i]) continue;
|
|
118519
|
+
|
|
118520
|
+
if (bSinglePrice)
|
|
118521
|
+
{
|
|
118522
|
+
drawData[i]={ YValue:price, Text:text };
|
|
118523
|
+
}
|
|
118524
|
+
else
|
|
118525
|
+
{
|
|
118526
|
+
if (IFrameSplitOperator.IsNumber(price[i])) drawData[i]={ YValue:price[i], Text:text };
|
|
118527
|
+
}
|
|
118528
|
+
}
|
|
118529
|
+
}
|
|
118530
|
+
else if (IFrameSplitOperator.IsPlusNumber(condition))
|
|
118531
|
+
{
|
|
118532
|
+
var bSinglePrice=IFrameSplitOperator.IsNumber(price);
|
|
118533
|
+
for(var i=0;i<this.SymbolData.Data.Data.length;++i)
|
|
118534
|
+
{
|
|
118535
|
+
if (bSinglePrice)
|
|
118536
|
+
{
|
|
118537
|
+
drawData[i]={ YValue:price, Text:text };
|
|
118538
|
+
}
|
|
118539
|
+
else
|
|
118540
|
+
{
|
|
118541
|
+
if (IFrameSplitOperator.IsNumber(price[i])) drawData[i]={ YValue:price[i], Text:text };
|
|
118542
|
+
}
|
|
118543
|
+
}
|
|
118544
|
+
}
|
|
118545
|
+
|
|
118546
|
+
return result;
|
|
118547
|
+
}
|
|
118548
|
+
|
|
117987
118549
|
this.DRAWTEXT=function(condition,price,text)
|
|
117988
118550
|
{
|
|
117989
118551
|
let drawData=[];
|
|
@@ -120364,6 +120926,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
120364
120926
|
"VERTLINE","HORLINE","TIPICON",
|
|
120365
120927
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
120366
120928
|
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR","DRAWDOUGHNUT",
|
|
120929
|
+
"DRAWFLAGTEXT"
|
|
120367
120930
|
]);
|
|
120368
120931
|
if (setFunctionName.has(name)) return true;
|
|
120369
120932
|
|
|
@@ -126929,6 +127492,10 @@ function JSExecute(ast,option)
|
|
|
126929
127492
|
node.Draw=this.Draw.DRAWTEXT_FIX(args[0],args[1],args[2],args[3],args[4]);
|
|
126930
127493
|
node.Out=[];
|
|
126931
127494
|
break;
|
|
127495
|
+
case "DRAWFLAGTEXT":
|
|
127496
|
+
node.Draw=this.Draw.DRAWFLAGTEXT(args[0],args[1],args[2]);
|
|
127497
|
+
node.Out=[];
|
|
127498
|
+
break;
|
|
126932
127499
|
case 'SUPERDRAWTEXT':
|
|
126933
127500
|
node.Draw=this.Draw.SUPERDRAWTEXT(args[0],args[1],args[2],args[3],args[4]);
|
|
126934
127501
|
node.Out=[];
|
|
@@ -129754,6 +130321,22 @@ function ScriptIndex(name,script,args,option)
|
|
|
129754
130321
|
hqChart.ChartPaint.push(chartText);
|
|
129755
130322
|
}
|
|
129756
130323
|
|
|
130324
|
+
this.CreateDrawFlagText=function(hqChart,windowIndex,varItem,id)
|
|
130325
|
+
{
|
|
130326
|
+
var chart=new ChartDrawFlagText();
|
|
130327
|
+
chart.Canvas=hqChart.Canvas;
|
|
130328
|
+
chart.Name=varItem.Name;
|
|
130329
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
130330
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
130331
|
+
if (chart.ReloadResource) chart.ReloadResource();
|
|
130332
|
+
|
|
130333
|
+
chart.Data=hqChart.GetKData();
|
|
130334
|
+
if (varItem.Draw.DrawData) chart.AryData=varItem.Draw.DrawData;
|
|
130335
|
+
chart.BuildCacheData();
|
|
130336
|
+
|
|
130337
|
+
hqChart.ChartPaint.push(chart);
|
|
130338
|
+
}
|
|
130339
|
+
|
|
129757
130340
|
//COLORSTICK
|
|
129758
130341
|
this.CreateMACD=function(hqChart,windowIndex,varItem,id)
|
|
129759
130342
|
{
|
|
@@ -131220,6 +131803,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
131220
131803
|
case 'DRAWTEXT':
|
|
131221
131804
|
this.CreateDrawTextV2(hqChart,windowIndex,item,i);
|
|
131222
131805
|
break;
|
|
131806
|
+
case "DRAWFLAGTEXT":
|
|
131807
|
+
this.CreateDrawFlagText(hqChart,windowIndex,item,i);
|
|
131808
|
+
break;
|
|
131223
131809
|
case 'SUPERDRAWTEXT':
|
|
131224
131810
|
this.CreateText(hqChart,windowIndex,item,i);
|
|
131225
131811
|
break;
|
|
@@ -131641,6 +132227,8 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
131641
132227
|
case 'DRAWTEXT':
|
|
131642
132228
|
this.CreateDrawTextV2(hqChart,windowIndex,item,i);
|
|
131643
132229
|
break;
|
|
132230
|
+
case "DRAWFLAGTEXT":
|
|
132231
|
+
this.CreateDrawFlagText(hqChart,windowIndex,item,i);
|
|
131644
132232
|
case 'SUPERDRAWTEXT':
|
|
131645
132233
|
this.CreateText(hqChart,windowIndex,item,i);
|
|
131646
132234
|
break;
|
|
@@ -132005,6 +132593,25 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
132005
132593
|
frame.ChartPaint.push(chartText);
|
|
132006
132594
|
}
|
|
132007
132595
|
|
|
132596
|
+
this.CreateDrawFlagText=function(hqChart,windowIndex,varItem,id)
|
|
132597
|
+
{
|
|
132598
|
+
var overlayIndex=this.OverlayIndex;
|
|
132599
|
+
var frame=overlayIndex.Frame;
|
|
132600
|
+
var chart=new ChartDrawFlagText();
|
|
132601
|
+
chart.Canvas=hqChart.Canvas;
|
|
132602
|
+
chart.Name=varItem.Name;
|
|
132603
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
132604
|
+
chart.ChartFrame=frame.Frame;
|
|
132605
|
+
chart.Identify=overlayIndex.Identify;
|
|
132606
|
+
if (chart.ReloadResource) chart.ReloadResource();
|
|
132607
|
+
|
|
132608
|
+
chart.Data=hqChart.GetKData();
|
|
132609
|
+
if (varItem.Draw.DrawData) chart.AryData=varItem.Draw.DrawData;
|
|
132610
|
+
chart.BuildCacheData();
|
|
132611
|
+
|
|
132612
|
+
frame.ChartPaint.push(chart);
|
|
132613
|
+
}
|
|
132614
|
+
|
|
132008
132615
|
//创建文本
|
|
132009
132616
|
this.CreateText=function(hqChart,windowIndex,varItem,id, drawName)
|
|
132010
132617
|
{
|
|
@@ -136078,6 +136685,13 @@ function GetBlackStyle()
|
|
|
136078
136685
|
BGColor:[null, "rgb(42,46,57)"],
|
|
136079
136686
|
SplitLine:{ Color:'rgb(73,133,231)', Width:1*GetDevicePixelRatio(), Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()] }
|
|
136080
136687
|
},
|
|
136688
|
+
|
|
136689
|
+
KLineCountDownPaint:
|
|
136690
|
+
{
|
|
136691
|
+
Unchange:{ BGColor:"rgb(190, 190 ,190)", PriceColor:"rgb(0,0,0)", TimeColor:"rgb(50,50,50)" },
|
|
136692
|
+
Up:{ BGColor:"rgb(238,21,21)", PriceColor:"rgb(250,250,250)", TimeColor:"rgb(190,190,190)" },
|
|
136693
|
+
Down:{ BGColor:"rgb(25,158,0)", PriceColor:"rgb(250,250,250)", TimeColor:"rgb(190,190,190)" },
|
|
136694
|
+
},
|
|
136081
136695
|
|
|
136082
136696
|
//成交明细
|
|
136083
136697
|
DealList:
|
|
@@ -152519,7 +153133,7 @@ function ScrollBarBGChart()
|
|
|
152519
153133
|
|
|
152520
153134
|
|
|
152521
153135
|
|
|
152522
|
-
var HQCHART_VERSION="1.1.
|
|
153136
|
+
var HQCHART_VERSION="1.1.15017";
|
|
152523
153137
|
|
|
152524
153138
|
function PrintHQChartVersion()
|
|
152525
153139
|
{
|