hqchart 1.1.13014 → 1.1.13019
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 +104 -88
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +180 -3
- package/src/jscommon/umychart.js +48 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +229 -4
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +229 -4
|
@@ -56339,6 +56339,7 @@ function IChartDrawPicture()
|
|
|
56339
56339
|
|
|
56340
56340
|
this.IsDrawFirst=false;
|
|
56341
56341
|
this.IsShowYCoordinate=false; //是否在Y轴显示点的刻度
|
|
56342
|
+
this.IsShow=true; //是否显示
|
|
56342
56343
|
|
|
56343
56344
|
this.LineColor=g_JSChartResource.DrawPicture.LineColor[0]; //线段颜色
|
|
56344
56345
|
//this.LineColor="#1e90ff"; //线段颜色,input type="color" 不支持rgb和rgba 的格式
|
|
@@ -57408,6 +57409,8 @@ function IChartDrawPicture()
|
|
|
57408
57409
|
this.GetXYCoordinate_default=function()
|
|
57409
57410
|
{
|
|
57410
57411
|
if (this.IsFrameMinSize()) return null;
|
|
57412
|
+
if (!this.IsShow) return null;
|
|
57413
|
+
|
|
57411
57414
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
57412
57415
|
|
|
57413
57416
|
return this.PointRange(drawPoint);
|
|
@@ -57863,6 +57866,7 @@ function ChartDrawPictureLine()
|
|
|
57863
57866
|
{
|
|
57864
57867
|
this.LinePoint=[];
|
|
57865
57868
|
if (this.IsFrameMinSize()) return;
|
|
57869
|
+
if (!this.IsShow) return;
|
|
57866
57870
|
|
|
57867
57871
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
57868
57872
|
if (!drawPoint) return;
|
|
@@ -57900,6 +57904,7 @@ function ChartDrawPictureLine()
|
|
|
57900
57904
|
this.GetYCoordinatePoint=function()
|
|
57901
57905
|
{
|
|
57902
57906
|
if (this.IsFrameMinSize()) return null;
|
|
57907
|
+
if (!this.IsShow) return null;
|
|
57903
57908
|
|
|
57904
57909
|
if (this.Status<2) return null;
|
|
57905
57910
|
if(!this.Point.length || !this.Frame) return null;
|
|
@@ -58062,6 +58067,7 @@ function ChartDrawGraffitiLine()
|
|
|
58062
58067
|
{
|
|
58063
58068
|
this.LinePoint=[];
|
|
58064
58069
|
if (this.IsFrameMinSize()) return;
|
|
58070
|
+
if (!this.IsShow) return;
|
|
58065
58071
|
|
|
58066
58072
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
58067
58073
|
if (!drawPoint) return;
|
|
@@ -58117,6 +58123,7 @@ function ChartDrawArrowLine()
|
|
|
58117
58123
|
{
|
|
58118
58124
|
this.LinePoint=[];
|
|
58119
58125
|
if (this.IsFrameMinSize()) return;
|
|
58126
|
+
if (!this.IsShow) return;
|
|
58120
58127
|
|
|
58121
58128
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
58122
58129
|
if (!drawPoint) return;
|
|
@@ -58235,6 +58242,7 @@ function ChartDrawPictureHaflLine()
|
|
|
58235
58242
|
this.LinePoint=[];
|
|
58236
58243
|
this.FullLine=null;
|
|
58237
58244
|
if (this.IsFrameMinSize()) return;
|
|
58245
|
+
if (!this.IsShow) return;
|
|
58238
58246
|
|
|
58239
58247
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
58240
58248
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -58313,6 +58321,7 @@ function ChartDrawPictureHorizontalLine()
|
|
|
58313
58321
|
{
|
|
58314
58322
|
this.LinePoint=[];
|
|
58315
58323
|
if (this.IsFrameMinSize()) return;
|
|
58324
|
+
if (!this.IsShow) return;
|
|
58316
58325
|
|
|
58317
58326
|
var drawPoint=this.CalculateDrawPoint();
|
|
58318
58327
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -58569,6 +58578,7 @@ function ChartDrawHLine()
|
|
|
58569
58578
|
this.ButtonBGWidth=0;
|
|
58570
58579
|
|
|
58571
58580
|
if (this.IsFrameMinSize()) return;
|
|
58581
|
+
if (!this.IsShow) return;
|
|
58572
58582
|
|
|
58573
58583
|
var drawPoint=this.CalculateDrawPoint();
|
|
58574
58584
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -58966,6 +58976,7 @@ function ChartDrawPictureTrendLine()
|
|
|
58966
58976
|
{
|
|
58967
58977
|
this.LinePoint=[];
|
|
58968
58978
|
if (this.IsFrameMinSize()) return;
|
|
58979
|
+
if (!this.IsShow) return;
|
|
58969
58980
|
|
|
58970
58981
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
58971
58982
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -59008,6 +59019,7 @@ function ChartDrawPictureRect()
|
|
|
59008
59019
|
this.Draw=function()
|
|
59009
59020
|
{
|
|
59010
59021
|
if (this.IsFrameMinSize()) return;
|
|
59022
|
+
if (!this.IsShow) return;
|
|
59011
59023
|
|
|
59012
59024
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
59013
59025
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -59119,6 +59131,7 @@ function ChartDrawPictureArc()
|
|
|
59119
59131
|
this.Draw=function()
|
|
59120
59132
|
{
|
|
59121
59133
|
if (this.IsFrameMinSize()) return;
|
|
59134
|
+
if (!this.IsShow) return;
|
|
59122
59135
|
|
|
59123
59136
|
var drawPoint=this.CalculateDrawPoint();
|
|
59124
59137
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -59350,6 +59363,7 @@ function ChartDrawPictureWaveMW()
|
|
|
59350
59363
|
this.LinePoint=[];
|
|
59351
59364
|
if (!this.Frame) return;
|
|
59352
59365
|
if (this.IsFrameMinSize()) return;
|
|
59366
|
+
if (!this.IsShow) return;
|
|
59353
59367
|
|
|
59354
59368
|
this.IsHScreen=this.Frame.IsHScreen;
|
|
59355
59369
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
@@ -59648,6 +59662,7 @@ function ChartDrawPictureParallelLines()
|
|
|
59648
59662
|
this.LinePoint=[];
|
|
59649
59663
|
this.CenterLine.Line=null;
|
|
59650
59664
|
if (this.IsFrameMinSize()) return;
|
|
59665
|
+
if (!this.IsShow) return;
|
|
59651
59666
|
|
|
59652
59667
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false}); //不检测x,y
|
|
59653
59668
|
if (!drawPoint) return;
|
|
@@ -59761,6 +59776,7 @@ function ChartDrawFlatTop()
|
|
|
59761
59776
|
{
|
|
59762
59777
|
this.LinePoint=[];
|
|
59763
59778
|
if (this.IsFrameMinSize()) return;
|
|
59779
|
+
if (!this.IsShow) return;
|
|
59764
59780
|
|
|
59765
59781
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
59766
59782
|
if (!drawPoint) return;
|
|
@@ -60113,6 +60129,7 @@ function ChartDrawPictureParallelChannel()
|
|
|
60113
60129
|
{
|
|
60114
60130
|
this.LinePoint=[];
|
|
60115
60131
|
if (this.IsFrameMinSize()) return;
|
|
60132
|
+
if (!this.IsShow) return;
|
|
60116
60133
|
|
|
60117
60134
|
var drawPoint=this.CalculateDrawPoint();
|
|
60118
60135
|
if (!drawPoint) return;
|
|
@@ -60263,6 +60280,7 @@ function ChartDrawPictureText()
|
|
|
60263
60280
|
{
|
|
60264
60281
|
this.TextRect=null;
|
|
60265
60282
|
if (this.IsFrameMinSize()) return;
|
|
60283
|
+
if (!this.IsShow) return;
|
|
60266
60284
|
|
|
60267
60285
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60268
60286
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -60366,6 +60384,7 @@ function ChartDrawPictureIconFont()
|
|
|
60366
60384
|
{
|
|
60367
60385
|
this.TextRect=null;
|
|
60368
60386
|
if (this.IsFrameMinSize()) return;
|
|
60387
|
+
if (!this.IsShow) return;
|
|
60369
60388
|
|
|
60370
60389
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60371
60390
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -60464,6 +60483,7 @@ function ChartDrawPictureGannFan()
|
|
|
60464
60483
|
{
|
|
60465
60484
|
this.LinePoint=[];
|
|
60466
60485
|
if (this.IsFrameMinSize()) return;
|
|
60486
|
+
if (!this.IsShow) return;
|
|
60467
60487
|
|
|
60468
60488
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60469
60489
|
if (!drawPoint) return;
|
|
@@ -60775,6 +60795,7 @@ function ChartDrawPictureGoldenSection()
|
|
|
60775
60795
|
{
|
|
60776
60796
|
this.LinePoint=[];
|
|
60777
60797
|
if (this.IsFrameMinSize()) return;
|
|
60798
|
+
if (!this.IsShow) return;
|
|
60778
60799
|
|
|
60779
60800
|
var drawPoint=this.CalculateDrawPoint();
|
|
60780
60801
|
if (!drawPoint) return;
|
|
@@ -60952,6 +60973,7 @@ function ChartDrawPictureTriangle()
|
|
|
60952
60973
|
{
|
|
60953
60974
|
this.LinePoint=[];
|
|
60954
60975
|
if (this.IsFrameMinSize()) return;
|
|
60976
|
+
if (!this.IsShow) return;
|
|
60955
60977
|
|
|
60956
60978
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60957
60979
|
if (!drawPoint) return;
|
|
@@ -61071,6 +61093,7 @@ function ChartDrawPictureSymmetryAngle()
|
|
|
61071
61093
|
{
|
|
61072
61094
|
this.LinePoint=[];
|
|
61073
61095
|
if (this.IsFrameMinSize()) return;
|
|
61096
|
+
if (!this.IsShow) return;
|
|
61074
61097
|
|
|
61075
61098
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61076
61099
|
if (!drawPoint) return;
|
|
@@ -61165,6 +61188,7 @@ function ChartDrawPictureCircle()
|
|
|
61165
61188
|
{
|
|
61166
61189
|
this.LinePoint=[];
|
|
61167
61190
|
if (this.IsFrameMinSize()) return;
|
|
61191
|
+
if (!this.IsShow) return;
|
|
61168
61192
|
|
|
61169
61193
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61170
61194
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -61228,6 +61252,7 @@ function ChartDrawPictureQuadrangle()
|
|
|
61228
61252
|
{
|
|
61229
61253
|
this.LinePoint=[];
|
|
61230
61254
|
if (this.IsFrameMinSize()) return;
|
|
61255
|
+
if (!this.IsShow) return;
|
|
61231
61256
|
|
|
61232
61257
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61233
61258
|
if (!drawPoint) return;
|
|
@@ -61324,6 +61349,7 @@ function ChartDrawPictureFibonacci()
|
|
|
61324
61349
|
{
|
|
61325
61350
|
this.LinePoint=[];
|
|
61326
61351
|
if (this.IsFrameMinSize()) return;
|
|
61352
|
+
if (!this.IsShow) return;
|
|
61327
61353
|
|
|
61328
61354
|
var drawPoint=this.CalculateDrawPoint();
|
|
61329
61355
|
if (!drawPoint) return;
|
|
@@ -61526,6 +61552,7 @@ function ChartDrawLinearRegression(option)
|
|
|
61526
61552
|
{
|
|
61527
61553
|
this.LinePoint=[];
|
|
61528
61554
|
if (this.IsFrameMinSize()) return;
|
|
61555
|
+
if (!this.IsShow) return;
|
|
61529
61556
|
|
|
61530
61557
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:true, IsCheckY:true} );
|
|
61531
61558
|
if (!drawPoint || drawPoint.length!=2)
|
|
@@ -61920,6 +61947,7 @@ function ChartDrawPriceLine()
|
|
|
61920
61947
|
{
|
|
61921
61948
|
this.LinePoint=[];
|
|
61922
61949
|
if (this.IsFrameMinSize()) return;
|
|
61950
|
+
if (!this.IsShow) return;
|
|
61923
61951
|
|
|
61924
61952
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true } );
|
|
61925
61953
|
if (!drawPoint) return;
|
|
@@ -62020,6 +62048,7 @@ function ChartDrawPriceLineV2()
|
|
|
62020
62048
|
{
|
|
62021
62049
|
this.LinePoint=[];
|
|
62022
62050
|
if (this.IsFrameMinSize()) return;
|
|
62051
|
+
if (!this.IsShow) return;
|
|
62023
62052
|
|
|
62024
62053
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true } );
|
|
62025
62054
|
if (!drawPoint) return;
|
|
@@ -62190,6 +62219,7 @@ function ChartDrawVerticalLine()
|
|
|
62190
62219
|
{
|
|
62191
62220
|
this.LinePoint=[];
|
|
62192
62221
|
if (this.IsFrameMinSize()) return;
|
|
62222
|
+
if (!this.IsShow) return;
|
|
62193
62223
|
|
|
62194
62224
|
if (!this.Frame || !this.Frame.Data) return;
|
|
62195
62225
|
var data=this.Frame.Data;
|
|
@@ -62268,6 +62298,7 @@ function ChartDrawWaveRuler()
|
|
|
62268
62298
|
{
|
|
62269
62299
|
this.LinePoint=[];
|
|
62270
62300
|
if (this.IsFrameMinSize()) return;
|
|
62301
|
+
if (!this.IsShow) return;
|
|
62271
62302
|
|
|
62272
62303
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62273
62304
|
if (!drawPoint) return;
|
|
@@ -62430,6 +62461,7 @@ function ChartDrawWaveRuler2Point()
|
|
|
62430
62461
|
{
|
|
62431
62462
|
this.LinePoint=[];
|
|
62432
62463
|
if (this.IsFrameMinSize()) return;
|
|
62464
|
+
if (!this.IsShow) return;
|
|
62433
62465
|
|
|
62434
62466
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62435
62467
|
if (!drawPoint) return;
|
|
@@ -62562,6 +62594,7 @@ function ChartDrawBox()
|
|
|
62562
62594
|
{
|
|
62563
62595
|
this.LinePoint=[];
|
|
62564
62596
|
if (this.IsFrameMinSize()) return;
|
|
62597
|
+
if (!this.IsShow) return;
|
|
62565
62598
|
|
|
62566
62599
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
62567
62600
|
if (!drawPoint) return;
|
|
@@ -62792,6 +62825,7 @@ function ChartDrawTwoPointDemo()
|
|
|
62792
62825
|
this.LinePoint=[];
|
|
62793
62826
|
this.PointInfo=[];
|
|
62794
62827
|
if (this.IsFrameMinSize()) return;
|
|
62828
|
+
if (!this.IsShow) return;
|
|
62795
62829
|
|
|
62796
62830
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62797
62831
|
if (!drawPoint) return;
|
|
@@ -63029,6 +63063,7 @@ function ChartDrawHLineSegment()
|
|
|
63029
63063
|
this.IsHScreen=this.Frame.IsHScreen;
|
|
63030
63064
|
this.LinePoint=[];
|
|
63031
63065
|
if (this.IsFrameMinSize()) return;
|
|
63066
|
+
if (!this.IsShow) return;
|
|
63032
63067
|
|
|
63033
63068
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true} );
|
|
63034
63069
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -63684,6 +63719,7 @@ function ChartDrawNote()
|
|
|
63684
63719
|
this.TextRect=null;
|
|
63685
63720
|
this.PtCenter=null;
|
|
63686
63721
|
if (this.IsFrameMinSize()) return;
|
|
63722
|
+
if (!this.IsShow) return;
|
|
63687
63723
|
|
|
63688
63724
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
63689
63725
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64067,6 +64103,7 @@ function ChartDrawAnchoredText()
|
|
|
64067
64103
|
if (this.Status<2) return;
|
|
64068
64104
|
if(this.Point.length!=1 || !this.Frame) return;
|
|
64069
64105
|
if (this.IsFrameMinSize()) return;
|
|
64106
|
+
if (!this.IsShow) return;
|
|
64070
64107
|
|
|
64071
64108
|
var drawPoint=this.CalculateDrawPoint();
|
|
64072
64109
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64416,6 +64453,7 @@ function ChartDrawPriceLabel()
|
|
|
64416
64453
|
{
|
|
64417
64454
|
this.TextRect=null;
|
|
64418
64455
|
if (this.IsFrameMinSize()) return;
|
|
64456
|
+
if (!this.IsShow) return;
|
|
64419
64457
|
|
|
64420
64458
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
64421
64459
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64655,6 +64693,7 @@ function ChartDrawPriceNote()
|
|
|
64655
64693
|
this.LinePoint=[];
|
|
64656
64694
|
this.TextRect=null;
|
|
64657
64695
|
if (this.IsFrameMinSize()) return;
|
|
64696
|
+
if (!this.IsShow) return;
|
|
64658
64697
|
|
|
64659
64698
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
64660
64699
|
if (!drawPoint) return;
|
|
@@ -64999,6 +65038,7 @@ function ChartDrawFibWedge()
|
|
|
64999
65038
|
this.TextAngle=null;
|
|
65000
65039
|
this.Radius=null;
|
|
65001
65040
|
if (this.IsFrameMinSize()) return;
|
|
65041
|
+
if (!this.IsShow) return;
|
|
65002
65042
|
|
|
65003
65043
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
65004
65044
|
if (!IFrameSplitOperator.IsNonEmptyArray(drawPoint)) return;
|
|
@@ -65382,6 +65422,8 @@ function ChartFibRetracement()
|
|
|
65382
65422
|
{
|
|
65383
65423
|
this.LinePoint=[];
|
|
65384
65424
|
if (this.IsFrameMinSize()) return;
|
|
65425
|
+
if (!this.IsShow) return;
|
|
65426
|
+
|
|
65385
65427
|
var bCheckXY=true;
|
|
65386
65428
|
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
65387
65429
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
@@ -65574,6 +65616,8 @@ function ChartFibSpeedResistanceFan()
|
|
|
65574
65616
|
{
|
|
65575
65617
|
this.LinePoint=[];
|
|
65576
65618
|
if (this.IsFrameMinSize()) return;
|
|
65619
|
+
if (!this.IsShow) return;
|
|
65620
|
+
|
|
65577
65621
|
var bCheckXY=false;
|
|
65578
65622
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
65579
65623
|
if (!drawPoint) return;
|
|
@@ -65839,6 +65883,8 @@ function ChartPriceRange()
|
|
|
65839
65883
|
{
|
|
65840
65884
|
this.LinePoint=[];
|
|
65841
65885
|
if (this.IsFrameMinSize()) return;
|
|
65886
|
+
if (!this.IsShow) return;
|
|
65887
|
+
|
|
65842
65888
|
var bCheckXY=true;
|
|
65843
65889
|
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
65844
65890
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
@@ -65956,6 +66002,8 @@ function ChartDateRange()
|
|
|
65956
66002
|
{
|
|
65957
66003
|
this.LinePoint=[];
|
|
65958
66004
|
if (this.IsFrameMinSize()) return;
|
|
66005
|
+
if (!this.IsShow) return;
|
|
66006
|
+
|
|
65959
66007
|
var bCheckXY=true;
|
|
65960
66008
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
65961
66009
|
if (!drawPoint) return;
|
|
@@ -94693,6 +94741,15 @@ function Node(ErrorHandler)
|
|
|
94693
94741
|
return;
|
|
94694
94742
|
}
|
|
94695
94743
|
|
|
94744
|
+
//"MA.MA1"(10,5,5)"
|
|
94745
|
+
if (callee.Type==Syntax.Literal)
|
|
94746
|
+
{
|
|
94747
|
+
var item={ ID:JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX, Args:args, FunctionName:callee.Value, DynamicName:callee.Value };
|
|
94748
|
+
if (token) item.Token={ Index:token.Start, Line:token.LineNumber };
|
|
94749
|
+
this.ExecuteIndex.push(item);
|
|
94750
|
+
return;
|
|
94751
|
+
}
|
|
94752
|
+
|
|
94696
94753
|
if (callee.Name=='COVER_C' || callee.Name=='COVER_O' || callee.Name=='COVER_H' || callee.Name=='COVER_L' || callee.Name=='COVER_A' || callee.Name=='COVER_V') //跨周期函数
|
|
94697
94754
|
{
|
|
94698
94755
|
var periodName=args[0].Value;
|
|
@@ -108682,6 +108739,98 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108682
108739
|
|
|
108683
108740
|
}
|
|
108684
108741
|
|
|
108742
|
+
this.CallDynamicScriptIndex=function(job, varTable)
|
|
108743
|
+
{
|
|
108744
|
+
var callInfo=job.DynamicName;
|
|
108745
|
+
var indexInfo={ Job:job, PeriodID:this.Period , Symbol:this.Symbol };
|
|
108746
|
+
if (!this.ReadIndexFunctionValue(callInfo,indexInfo)) //读取指标
|
|
108747
|
+
{
|
|
108748
|
+
var token=job.Token;
|
|
108749
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() Error: '${callInfo}' ${indexInfo.Error}`);
|
|
108750
|
+
}
|
|
108751
|
+
|
|
108752
|
+
var systemIndex=new JSIndexScript(); //系统指标
|
|
108753
|
+
var systemItem=systemIndex.Get(indexInfo.Name);
|
|
108754
|
+
if (!systemItem)
|
|
108755
|
+
{
|
|
108756
|
+
var token=job.Token;
|
|
108757
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() Error: '${callInfo}' ${indexInfo.Name} 指标不存在`);
|
|
108758
|
+
}
|
|
108759
|
+
|
|
108760
|
+
indexInfo.SytemIndex=systemItem;
|
|
108761
|
+
if (!this.ReadDynamicIndexArgumentValue(job.Args, indexInfo, varTable))
|
|
108762
|
+
{
|
|
108763
|
+
var token=job.Token;
|
|
108764
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() ${indexInfo.Name} 指标参数错误 : ${indexInfo.Error} `);
|
|
108765
|
+
}
|
|
108766
|
+
|
|
108767
|
+
JSConsole.Complier.Log('[JSSymbolData::CallMemberScriptIndex] call script index', indexInfo);
|
|
108768
|
+
|
|
108769
|
+
var dateTimeRange=this.Data.GetDateRange();
|
|
108770
|
+
|
|
108771
|
+
var option=
|
|
108772
|
+
{
|
|
108773
|
+
HQDataType:this.DataType,
|
|
108774
|
+
Symbol:indexInfo.Symbol,
|
|
108775
|
+
Name:'',
|
|
108776
|
+
Right:this.Right, //复权
|
|
108777
|
+
Period:indexInfo.PeriodID, //周期
|
|
108778
|
+
Data:null,
|
|
108779
|
+
SourceData:null,
|
|
108780
|
+
Callback:(outVar,job, symbolData)=> {
|
|
108781
|
+
this.RecvDynamicScriptIndexData(outVar,job,symbolData);
|
|
108782
|
+
this.Execute.RunNextJob();
|
|
108783
|
+
},
|
|
108784
|
+
CallbackParam:indexInfo,
|
|
108785
|
+
Async:true,
|
|
108786
|
+
MaxRequestDataCount:this.MaxRequestDataCount+30*2,
|
|
108787
|
+
MaxRequestMinuteDayCount:this.MaxRequestMinuteDayCount+2,
|
|
108788
|
+
Arguments:indexInfo.Args,
|
|
108789
|
+
//Condition:this.Condition,
|
|
108790
|
+
IsBeforeData:this.IsBeforeData,
|
|
108791
|
+
NetworkFilter:this.NetworkFilter,
|
|
108792
|
+
IsApiPeriod:this.IsApiPeriod,
|
|
108793
|
+
KLineRange:dateTimeRange //K线数据范围
|
|
108794
|
+
};
|
|
108795
|
+
|
|
108796
|
+
//执行脚本
|
|
108797
|
+
var run=JSComplier.Execute(systemItem.Script,option,(error, indexInfo)=>{this.ExecuteScriptIndexError(error,indexInfo)});
|
|
108798
|
+
}
|
|
108799
|
+
|
|
108800
|
+
this.ReadDynamicIndexArgumentValue=function(args, result, varTable)
|
|
108801
|
+
{
|
|
108802
|
+
result.Args=[];
|
|
108803
|
+
for(var i =0;i<result.SytemIndex.Args.length; ++i) //复制参数
|
|
108804
|
+
{
|
|
108805
|
+
var item=result.SytemIndex.Args[i];
|
|
108806
|
+
result.Args.push({ Value:item.Value, Name:item.Name, IsDefault:true });
|
|
108807
|
+
}
|
|
108808
|
+
|
|
108809
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(args)) return true;
|
|
108810
|
+
|
|
108811
|
+
for(var i=0;i<args.length;++i)
|
|
108812
|
+
{
|
|
108813
|
+
var item=args[i];
|
|
108814
|
+
var argItem=result.Args[i];
|
|
108815
|
+
if (!argItem) continue;
|
|
108816
|
+
if (item.Type==Syntax.Literal)
|
|
108817
|
+
{
|
|
108818
|
+
argItem.Value=item.Value;
|
|
108819
|
+
argItem.IsDefault=false;
|
|
108820
|
+
}
|
|
108821
|
+
else if (item.Type==Syntax.Identifier) //支持传参
|
|
108822
|
+
{
|
|
108823
|
+
if (varTable.has(item.Name))
|
|
108824
|
+
{
|
|
108825
|
+
argItem.Value=varTable.get(item.Name);
|
|
108826
|
+
argItem.IsDefault=false;
|
|
108827
|
+
}
|
|
108828
|
+
}
|
|
108829
|
+
}
|
|
108830
|
+
|
|
108831
|
+
return true;
|
|
108832
|
+
}
|
|
108833
|
+
|
|
108685
108834
|
/*****************************************************************************************************************************
|
|
108686
108835
|
脚本调用
|
|
108687
108836
|
|
|
@@ -108695,10 +108844,13 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108695
108844
|
CALCSTOCKINDEX('SH600000','KDJ',3)表示上证600000的KDJ指标第3个输出即J之值,第一个参数可在前面加SZ(深市),SH(沪市),BJ(京市),或市场_,,
|
|
108696
108845
|
CALCSTOCKINDEX('47_IFL0','MACD',2)表示IFL0品种的MACD指标第2个输出值.
|
|
108697
108846
|
|
|
108847
|
+
"MA.MA1"(6,12,18)
|
|
108848
|
+
|
|
108698
108849
|
*******************************************************************************************************************************/
|
|
108699
|
-
this.CallScriptIndex=function(job)
|
|
108850
|
+
this.CallScriptIndex=function(job, varTable)
|
|
108700
108851
|
{
|
|
108701
108852
|
if (job.Member) return this.CallMemberScriptIndex(job);
|
|
108853
|
+
if (job.DynamicName) return this.CallDynamicScriptIndex(job, varTable);
|
|
108702
108854
|
|
|
108703
108855
|
if (!job.Args || !(job.Args.length>=2))
|
|
108704
108856
|
{
|
|
@@ -108811,6 +108963,42 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108811
108963
|
}
|
|
108812
108964
|
}
|
|
108813
108965
|
|
|
108966
|
+
this.RecvDynamicScriptIndexData=function(outVar,indexInfo,symbolData)
|
|
108967
|
+
{
|
|
108968
|
+
JSConsole.Complier.Log('[JSSymbolData::RecvDynamicScriptIndexData] ', outVar, indexInfo, symbolData);
|
|
108969
|
+
var kLine=symbolData.Data.Data;
|
|
108970
|
+
var aryOutVar=outVar;
|
|
108971
|
+
var data=this.Data.FitKLineIndex(kLine,aryOutVar,this.Period,indexInfo.PeriodID);
|
|
108972
|
+
|
|
108973
|
+
var objName=indexInfo.Name;
|
|
108974
|
+
var memberValue={};
|
|
108975
|
+
if (this.Execute.VarTable.has(objName))
|
|
108976
|
+
memberValue=this.Execute.VarTable.get(objName);
|
|
108977
|
+
else
|
|
108978
|
+
this.Execute.VarTable.set(objName, memberValue);
|
|
108979
|
+
|
|
108980
|
+
var strValue="";
|
|
108981
|
+
for(var i=0; i<indexInfo.Args.length; ++i)
|
|
108982
|
+
{
|
|
108983
|
+
var item=indexInfo.Args[i];
|
|
108984
|
+
if (item.IsDefault===false)
|
|
108985
|
+
{
|
|
108986
|
+
if (strValue.length>0) strValue+=",";
|
|
108987
|
+
strValue+=`${item.Value}`;
|
|
108988
|
+
}
|
|
108989
|
+
}
|
|
108990
|
+
var strArgs=`(${strValue})`;
|
|
108991
|
+
|
|
108992
|
+
//保存所有的指标数据, 下面用到了就可以不用算了
|
|
108993
|
+
for(var i=0; i<data.length; ++i)
|
|
108994
|
+
{
|
|
108995
|
+
var key=`${outVar[i].Name}#${strArgs}`;
|
|
108996
|
+
if (indexInfo.Period) key+='#'+indexInfo.Period; //带周期的变量
|
|
108997
|
+
|
|
108998
|
+
memberValue[key]=data[i].Data;
|
|
108999
|
+
}
|
|
109000
|
+
}
|
|
109001
|
+
|
|
108814
109002
|
this.RecvScriptIndexData=function(outVar,indexInfo,symbolData)
|
|
108815
109003
|
{
|
|
108816
109004
|
var key=this.GenerateScriptIndexKey(indexInfo);
|
|
@@ -109684,7 +109872,8 @@ var JS_EXECUTE_JOB_ID=
|
|
|
109684
109872
|
//KDJ.K , KDJ.K#WEEK
|
|
109685
109873
|
//STKINDI('600000.sh','MA.MA1#WEEK',5,10,20,30,60,120);
|
|
109686
109874
|
//CALCSTOCKINDEX('SH600000','KDJ',3)表示上证600000的KDJ指标第3个输出即J之值,第一个参数可在前面加SZ(深市),SH(沪市),BJ(京市)
|
|
109687
|
-
|
|
109875
|
+
//"MA.MA(5,5,5)" 调用动态指标
|
|
109876
|
+
JOB_EXECUTE_INDEX:30010,
|
|
109688
109877
|
|
|
109689
109878
|
JOB_RUN_SCRIPT:10000, //执行脚本
|
|
109690
109879
|
|
|
@@ -110003,7 +110192,7 @@ function JSExecute(ast,option)
|
|
|
110003
110192
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_CUSTOM_API_DATA:
|
|
110004
110193
|
return this.SymbolData.DownloadCustomAPIData(jobItem);
|
|
110005
110194
|
case JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX:
|
|
110006
|
-
return this.SymbolData.CallScriptIndex(jobItem);
|
|
110195
|
+
return this.SymbolData.CallScriptIndex(jobItem, this.VarTable);
|
|
110007
110196
|
|
|
110008
110197
|
case JS_EXECUTE_JOB_ID.JOB_RUN_SCRIPT:
|
|
110009
110198
|
if (this.Debug===1 && this.DebugFilter)
|
|
@@ -110983,6 +111172,35 @@ function JSExecute(ast,option)
|
|
|
110983
111172
|
args.push(value);
|
|
110984
111173
|
}
|
|
110985
111174
|
|
|
111175
|
+
if (node.Callee.Type==Syntax.Literal)
|
|
111176
|
+
{
|
|
111177
|
+
var dynamicName=node.Callee.Value;
|
|
111178
|
+
var aryValue=dynamicName.split(".");
|
|
111179
|
+
if (aryValue.length!=2)
|
|
111180
|
+
{
|
|
111181
|
+
this.ThrowUnexpectedNode(node,`调用指标格式'${dynamicName}'错误`);
|
|
111182
|
+
}
|
|
111183
|
+
|
|
111184
|
+
var name=aryValue[0];
|
|
111185
|
+
var outName=aryValue[1];
|
|
111186
|
+
var strValue="";
|
|
111187
|
+
for(var i=0; i<args.length; ++i)
|
|
111188
|
+
{
|
|
111189
|
+
var value=args[i];
|
|
111190
|
+
if (strValue.length>0) strValue+=",";
|
|
111191
|
+
strValue+=`${value}`;
|
|
111192
|
+
}
|
|
111193
|
+
var strArgs=`(${strValue})`;
|
|
111194
|
+
var key=`${outName}#${strArgs}`;
|
|
111195
|
+
|
|
111196
|
+
node.Out=[];
|
|
111197
|
+
if (!this.VarTable.has(name)) return node.Out;
|
|
111198
|
+
var indexData=this.VarTable.get(name);
|
|
111199
|
+
var value=indexData[key];
|
|
111200
|
+
if (value) node.Out=value;
|
|
111201
|
+
return node.Out;
|
|
111202
|
+
}
|
|
111203
|
+
|
|
110986
111204
|
if (funcName==="IFC")
|
|
110987
111205
|
{
|
|
110988
111206
|
//IFC(X,A,B)若X不为0则执行A,否则执行B.IFC与IF函数的区别:根据X的值来选择性执行A、B表达式.
|
|
@@ -111988,6 +112206,13 @@ function JSExplainer(ast,option)
|
|
|
111988
112206
|
args.push(value);
|
|
111989
112207
|
}
|
|
111990
112208
|
|
|
112209
|
+
if (node.Callee.Type==Syntax.Literal)
|
|
112210
|
+
{
|
|
112211
|
+
var dynamicName=node.Callee.Value;
|
|
112212
|
+
node.Out=`指标引用'${dynamicName}'`;
|
|
112213
|
+
return node.Out;
|
|
112214
|
+
}
|
|
112215
|
+
|
|
111991
112216
|
JSConsole.Complier.Log('[JSExplainer::VisitCallExpression]' , funcName, '(', args.toString() ,')');
|
|
111992
112217
|
|
|
111993
112218
|
if (g_JSComplierResource.IsCustomFunction(funcName))
|
|
@@ -130012,7 +130237,7 @@ function HQChartScriptWorker()
|
|
|
130012
130237
|
|
|
130013
130238
|
|
|
130014
130239
|
|
|
130015
|
-
var HQCHART_VERSION="1.1.
|
|
130240
|
+
var HQCHART_VERSION="1.1.13018";
|
|
130016
130241
|
|
|
130017
130242
|
function PrintHQChartVersion()
|
|
130018
130243
|
{
|