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
|
@@ -56295,6 +56295,7 @@ function IChartDrawPicture()
|
|
|
56295
56295
|
|
|
56296
56296
|
this.IsDrawFirst=false;
|
|
56297
56297
|
this.IsShowYCoordinate=false; //是否在Y轴显示点的刻度
|
|
56298
|
+
this.IsShow=true; //是否显示
|
|
56298
56299
|
|
|
56299
56300
|
this.LineColor=g_JSChartResource.DrawPicture.LineColor[0]; //线段颜色
|
|
56300
56301
|
//this.LineColor="#1e90ff"; //线段颜色,input type="color" 不支持rgb和rgba 的格式
|
|
@@ -57364,6 +57365,8 @@ function IChartDrawPicture()
|
|
|
57364
57365
|
this.GetXYCoordinate_default=function()
|
|
57365
57366
|
{
|
|
57366
57367
|
if (this.IsFrameMinSize()) return null;
|
|
57368
|
+
if (!this.IsShow) return null;
|
|
57369
|
+
|
|
57367
57370
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
57368
57371
|
|
|
57369
57372
|
return this.PointRange(drawPoint);
|
|
@@ -57819,6 +57822,7 @@ function ChartDrawPictureLine()
|
|
|
57819
57822
|
{
|
|
57820
57823
|
this.LinePoint=[];
|
|
57821
57824
|
if (this.IsFrameMinSize()) return;
|
|
57825
|
+
if (!this.IsShow) return;
|
|
57822
57826
|
|
|
57823
57827
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
57824
57828
|
if (!drawPoint) return;
|
|
@@ -57856,6 +57860,7 @@ function ChartDrawPictureLine()
|
|
|
57856
57860
|
this.GetYCoordinatePoint=function()
|
|
57857
57861
|
{
|
|
57858
57862
|
if (this.IsFrameMinSize()) return null;
|
|
57863
|
+
if (!this.IsShow) return null;
|
|
57859
57864
|
|
|
57860
57865
|
if (this.Status<2) return null;
|
|
57861
57866
|
if(!this.Point.length || !this.Frame) return null;
|
|
@@ -58018,6 +58023,7 @@ function ChartDrawGraffitiLine()
|
|
|
58018
58023
|
{
|
|
58019
58024
|
this.LinePoint=[];
|
|
58020
58025
|
if (this.IsFrameMinSize()) return;
|
|
58026
|
+
if (!this.IsShow) return;
|
|
58021
58027
|
|
|
58022
58028
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
58023
58029
|
if (!drawPoint) return;
|
|
@@ -58073,6 +58079,7 @@ function ChartDrawArrowLine()
|
|
|
58073
58079
|
{
|
|
58074
58080
|
this.LinePoint=[];
|
|
58075
58081
|
if (this.IsFrameMinSize()) return;
|
|
58082
|
+
if (!this.IsShow) return;
|
|
58076
58083
|
|
|
58077
58084
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
58078
58085
|
if (!drawPoint) return;
|
|
@@ -58191,6 +58198,7 @@ function ChartDrawPictureHaflLine()
|
|
|
58191
58198
|
this.LinePoint=[];
|
|
58192
58199
|
this.FullLine=null;
|
|
58193
58200
|
if (this.IsFrameMinSize()) return;
|
|
58201
|
+
if (!this.IsShow) return;
|
|
58194
58202
|
|
|
58195
58203
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
58196
58204
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -58269,6 +58277,7 @@ function ChartDrawPictureHorizontalLine()
|
|
|
58269
58277
|
{
|
|
58270
58278
|
this.LinePoint=[];
|
|
58271
58279
|
if (this.IsFrameMinSize()) return;
|
|
58280
|
+
if (!this.IsShow) return;
|
|
58272
58281
|
|
|
58273
58282
|
var drawPoint=this.CalculateDrawPoint();
|
|
58274
58283
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -58525,6 +58534,7 @@ function ChartDrawHLine()
|
|
|
58525
58534
|
this.ButtonBGWidth=0;
|
|
58526
58535
|
|
|
58527
58536
|
if (this.IsFrameMinSize()) return;
|
|
58537
|
+
if (!this.IsShow) return;
|
|
58528
58538
|
|
|
58529
58539
|
var drawPoint=this.CalculateDrawPoint();
|
|
58530
58540
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -58922,6 +58932,7 @@ function ChartDrawPictureTrendLine()
|
|
|
58922
58932
|
{
|
|
58923
58933
|
this.LinePoint=[];
|
|
58924
58934
|
if (this.IsFrameMinSize()) return;
|
|
58935
|
+
if (!this.IsShow) return;
|
|
58925
58936
|
|
|
58926
58937
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
58927
58938
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -58964,6 +58975,7 @@ function ChartDrawPictureRect()
|
|
|
58964
58975
|
this.Draw=function()
|
|
58965
58976
|
{
|
|
58966
58977
|
if (this.IsFrameMinSize()) return;
|
|
58978
|
+
if (!this.IsShow) return;
|
|
58967
58979
|
|
|
58968
58980
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
58969
58981
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -59075,6 +59087,7 @@ function ChartDrawPictureArc()
|
|
|
59075
59087
|
this.Draw=function()
|
|
59076
59088
|
{
|
|
59077
59089
|
if (this.IsFrameMinSize()) return;
|
|
59090
|
+
if (!this.IsShow) return;
|
|
59078
59091
|
|
|
59079
59092
|
var drawPoint=this.CalculateDrawPoint();
|
|
59080
59093
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -59306,6 +59319,7 @@ function ChartDrawPictureWaveMW()
|
|
|
59306
59319
|
this.LinePoint=[];
|
|
59307
59320
|
if (!this.Frame) return;
|
|
59308
59321
|
if (this.IsFrameMinSize()) return;
|
|
59322
|
+
if (!this.IsShow) return;
|
|
59309
59323
|
|
|
59310
59324
|
this.IsHScreen=this.Frame.IsHScreen;
|
|
59311
59325
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
@@ -59604,6 +59618,7 @@ function ChartDrawPictureParallelLines()
|
|
|
59604
59618
|
this.LinePoint=[];
|
|
59605
59619
|
this.CenterLine.Line=null;
|
|
59606
59620
|
if (this.IsFrameMinSize()) return;
|
|
59621
|
+
if (!this.IsShow) return;
|
|
59607
59622
|
|
|
59608
59623
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false}); //不检测x,y
|
|
59609
59624
|
if (!drawPoint) return;
|
|
@@ -59717,6 +59732,7 @@ function ChartDrawFlatTop()
|
|
|
59717
59732
|
{
|
|
59718
59733
|
this.LinePoint=[];
|
|
59719
59734
|
if (this.IsFrameMinSize()) return;
|
|
59735
|
+
if (!this.IsShow) return;
|
|
59720
59736
|
|
|
59721
59737
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
59722
59738
|
if (!drawPoint) return;
|
|
@@ -60069,6 +60085,7 @@ function ChartDrawPictureParallelChannel()
|
|
|
60069
60085
|
{
|
|
60070
60086
|
this.LinePoint=[];
|
|
60071
60087
|
if (this.IsFrameMinSize()) return;
|
|
60088
|
+
if (!this.IsShow) return;
|
|
60072
60089
|
|
|
60073
60090
|
var drawPoint=this.CalculateDrawPoint();
|
|
60074
60091
|
if (!drawPoint) return;
|
|
@@ -60219,6 +60236,7 @@ function ChartDrawPictureText()
|
|
|
60219
60236
|
{
|
|
60220
60237
|
this.TextRect=null;
|
|
60221
60238
|
if (this.IsFrameMinSize()) return;
|
|
60239
|
+
if (!this.IsShow) return;
|
|
60222
60240
|
|
|
60223
60241
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60224
60242
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -60322,6 +60340,7 @@ function ChartDrawPictureIconFont()
|
|
|
60322
60340
|
{
|
|
60323
60341
|
this.TextRect=null;
|
|
60324
60342
|
if (this.IsFrameMinSize()) return;
|
|
60343
|
+
if (!this.IsShow) return;
|
|
60325
60344
|
|
|
60326
60345
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60327
60346
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -60420,6 +60439,7 @@ function ChartDrawPictureGannFan()
|
|
|
60420
60439
|
{
|
|
60421
60440
|
this.LinePoint=[];
|
|
60422
60441
|
if (this.IsFrameMinSize()) return;
|
|
60442
|
+
if (!this.IsShow) return;
|
|
60423
60443
|
|
|
60424
60444
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60425
60445
|
if (!drawPoint) return;
|
|
@@ -60731,6 +60751,7 @@ function ChartDrawPictureGoldenSection()
|
|
|
60731
60751
|
{
|
|
60732
60752
|
this.LinePoint=[];
|
|
60733
60753
|
if (this.IsFrameMinSize()) return;
|
|
60754
|
+
if (!this.IsShow) return;
|
|
60734
60755
|
|
|
60735
60756
|
var drawPoint=this.CalculateDrawPoint();
|
|
60736
60757
|
if (!drawPoint) return;
|
|
@@ -60908,6 +60929,7 @@ function ChartDrawPictureTriangle()
|
|
|
60908
60929
|
{
|
|
60909
60930
|
this.LinePoint=[];
|
|
60910
60931
|
if (this.IsFrameMinSize()) return;
|
|
60932
|
+
if (!this.IsShow) return;
|
|
60911
60933
|
|
|
60912
60934
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
60913
60935
|
if (!drawPoint) return;
|
|
@@ -61027,6 +61049,7 @@ function ChartDrawPictureSymmetryAngle()
|
|
|
61027
61049
|
{
|
|
61028
61050
|
this.LinePoint=[];
|
|
61029
61051
|
if (this.IsFrameMinSize()) return;
|
|
61052
|
+
if (!this.IsShow) return;
|
|
61030
61053
|
|
|
61031
61054
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61032
61055
|
if (!drawPoint) return;
|
|
@@ -61121,6 +61144,7 @@ function ChartDrawPictureCircle()
|
|
|
61121
61144
|
{
|
|
61122
61145
|
this.LinePoint=[];
|
|
61123
61146
|
if (this.IsFrameMinSize()) return;
|
|
61147
|
+
if (!this.IsShow) return;
|
|
61124
61148
|
|
|
61125
61149
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61126
61150
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -61184,6 +61208,7 @@ function ChartDrawPictureQuadrangle()
|
|
|
61184
61208
|
{
|
|
61185
61209
|
this.LinePoint=[];
|
|
61186
61210
|
if (this.IsFrameMinSize()) return;
|
|
61211
|
+
if (!this.IsShow) return;
|
|
61187
61212
|
|
|
61188
61213
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
61189
61214
|
if (!drawPoint) return;
|
|
@@ -61280,6 +61305,7 @@ function ChartDrawPictureFibonacci()
|
|
|
61280
61305
|
{
|
|
61281
61306
|
this.LinePoint=[];
|
|
61282
61307
|
if (this.IsFrameMinSize()) return;
|
|
61308
|
+
if (!this.IsShow) return;
|
|
61283
61309
|
|
|
61284
61310
|
var drawPoint=this.CalculateDrawPoint();
|
|
61285
61311
|
if (!drawPoint) return;
|
|
@@ -61482,6 +61508,7 @@ function ChartDrawLinearRegression(option)
|
|
|
61482
61508
|
{
|
|
61483
61509
|
this.LinePoint=[];
|
|
61484
61510
|
if (this.IsFrameMinSize()) return;
|
|
61511
|
+
if (!this.IsShow) return;
|
|
61485
61512
|
|
|
61486
61513
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:true, IsCheckY:true} );
|
|
61487
61514
|
if (!drawPoint || drawPoint.length!=2)
|
|
@@ -61876,6 +61903,7 @@ function ChartDrawPriceLine()
|
|
|
61876
61903
|
{
|
|
61877
61904
|
this.LinePoint=[];
|
|
61878
61905
|
if (this.IsFrameMinSize()) return;
|
|
61906
|
+
if (!this.IsShow) return;
|
|
61879
61907
|
|
|
61880
61908
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true } );
|
|
61881
61909
|
if (!drawPoint) return;
|
|
@@ -61976,6 +62004,7 @@ function ChartDrawPriceLineV2()
|
|
|
61976
62004
|
{
|
|
61977
62005
|
this.LinePoint=[];
|
|
61978
62006
|
if (this.IsFrameMinSize()) return;
|
|
62007
|
+
if (!this.IsShow) return;
|
|
61979
62008
|
|
|
61980
62009
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true } );
|
|
61981
62010
|
if (!drawPoint) return;
|
|
@@ -62146,6 +62175,7 @@ function ChartDrawVerticalLine()
|
|
|
62146
62175
|
{
|
|
62147
62176
|
this.LinePoint=[];
|
|
62148
62177
|
if (this.IsFrameMinSize()) return;
|
|
62178
|
+
if (!this.IsShow) return;
|
|
62149
62179
|
|
|
62150
62180
|
if (!this.Frame || !this.Frame.Data) return;
|
|
62151
62181
|
var data=this.Frame.Data;
|
|
@@ -62224,6 +62254,7 @@ function ChartDrawWaveRuler()
|
|
|
62224
62254
|
{
|
|
62225
62255
|
this.LinePoint=[];
|
|
62226
62256
|
if (this.IsFrameMinSize()) return;
|
|
62257
|
+
if (!this.IsShow) return;
|
|
62227
62258
|
|
|
62228
62259
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62229
62260
|
if (!drawPoint) return;
|
|
@@ -62386,6 +62417,7 @@ function ChartDrawWaveRuler2Point()
|
|
|
62386
62417
|
{
|
|
62387
62418
|
this.LinePoint=[];
|
|
62388
62419
|
if (this.IsFrameMinSize()) return;
|
|
62420
|
+
if (!this.IsShow) return;
|
|
62389
62421
|
|
|
62390
62422
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62391
62423
|
if (!drawPoint) return;
|
|
@@ -62518,6 +62550,7 @@ function ChartDrawBox()
|
|
|
62518
62550
|
{
|
|
62519
62551
|
this.LinePoint=[];
|
|
62520
62552
|
if (this.IsFrameMinSize()) return;
|
|
62553
|
+
if (!this.IsShow) return;
|
|
62521
62554
|
|
|
62522
62555
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
62523
62556
|
if (!drawPoint) return;
|
|
@@ -62748,6 +62781,7 @@ function ChartDrawTwoPointDemo()
|
|
|
62748
62781
|
this.LinePoint=[];
|
|
62749
62782
|
this.PointInfo=[];
|
|
62750
62783
|
if (this.IsFrameMinSize()) return;
|
|
62784
|
+
if (!this.IsShow) return;
|
|
62751
62785
|
|
|
62752
62786
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
62753
62787
|
if (!drawPoint) return;
|
|
@@ -62985,6 +63019,7 @@ function ChartDrawHLineSegment()
|
|
|
62985
63019
|
this.IsHScreen=this.Frame.IsHScreen;
|
|
62986
63020
|
this.LinePoint=[];
|
|
62987
63021
|
if (this.IsFrameMinSize()) return;
|
|
63022
|
+
if (!this.IsShow) return;
|
|
62988
63023
|
|
|
62989
63024
|
var drawPoint=this.CalculateDrawPoint( { IsCheckX:false, IsCheckY:true} );
|
|
62990
63025
|
if (!drawPoint || drawPoint.length!=2) return;
|
|
@@ -63640,6 +63675,7 @@ function ChartDrawNote()
|
|
|
63640
63675
|
this.TextRect=null;
|
|
63641
63676
|
this.PtCenter=null;
|
|
63642
63677
|
if (this.IsFrameMinSize()) return;
|
|
63678
|
+
if (!this.IsShow) return;
|
|
63643
63679
|
|
|
63644
63680
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
63645
63681
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64023,6 +64059,7 @@ function ChartDrawAnchoredText()
|
|
|
64023
64059
|
if (this.Status<2) return;
|
|
64024
64060
|
if(this.Point.length!=1 || !this.Frame) return;
|
|
64025
64061
|
if (this.IsFrameMinSize()) return;
|
|
64062
|
+
if (!this.IsShow) return;
|
|
64026
64063
|
|
|
64027
64064
|
var drawPoint=this.CalculateDrawPoint();
|
|
64028
64065
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64372,6 +64409,7 @@ function ChartDrawPriceLabel()
|
|
|
64372
64409
|
{
|
|
64373
64410
|
this.TextRect=null;
|
|
64374
64411
|
if (this.IsFrameMinSize()) return;
|
|
64412
|
+
if (!this.IsShow) return;
|
|
64375
64413
|
|
|
64376
64414
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:true, IsCheckY:true});
|
|
64377
64415
|
if (!drawPoint || drawPoint.length!=1) return;
|
|
@@ -64611,6 +64649,7 @@ function ChartDrawPriceNote()
|
|
|
64611
64649
|
this.LinePoint=[];
|
|
64612
64650
|
this.TextRect=null;
|
|
64613
64651
|
if (this.IsFrameMinSize()) return;
|
|
64652
|
+
if (!this.IsShow) return;
|
|
64614
64653
|
|
|
64615
64654
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
64616
64655
|
if (!drawPoint) return;
|
|
@@ -64955,6 +64994,7 @@ function ChartDrawFibWedge()
|
|
|
64955
64994
|
this.TextAngle=null;
|
|
64956
64995
|
this.Radius=null;
|
|
64957
64996
|
if (this.IsFrameMinSize()) return;
|
|
64997
|
+
if (!this.IsShow) return;
|
|
64958
64998
|
|
|
64959
64999
|
var drawPoint=this.CalculateDrawPoint({IsCheckX:false, IsCheckY:false});
|
|
64960
65000
|
if (!IFrameSplitOperator.IsNonEmptyArray(drawPoint)) return;
|
|
@@ -65338,6 +65378,8 @@ function ChartFibRetracement()
|
|
|
65338
65378
|
{
|
|
65339
65379
|
this.LinePoint=[];
|
|
65340
65380
|
if (this.IsFrameMinSize()) return;
|
|
65381
|
+
if (!this.IsShow) return;
|
|
65382
|
+
|
|
65341
65383
|
var bCheckXY=true;
|
|
65342
65384
|
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
65343
65385
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
@@ -65530,6 +65572,8 @@ function ChartFibSpeedResistanceFan()
|
|
|
65530
65572
|
{
|
|
65531
65573
|
this.LinePoint=[];
|
|
65532
65574
|
if (this.IsFrameMinSize()) return;
|
|
65575
|
+
if (!this.IsShow) return;
|
|
65576
|
+
|
|
65533
65577
|
var bCheckXY=false;
|
|
65534
65578
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
65535
65579
|
if (!drawPoint) return;
|
|
@@ -65795,6 +65839,8 @@ function ChartPriceRange()
|
|
|
65795
65839
|
{
|
|
65796
65840
|
this.LinePoint=[];
|
|
65797
65841
|
if (this.IsFrameMinSize()) return;
|
|
65842
|
+
if (!this.IsShow) return;
|
|
65843
|
+
|
|
65798
65844
|
var bCheckXY=true;
|
|
65799
65845
|
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
65800
65846
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
@@ -65912,6 +65958,8 @@ function ChartDateRange()
|
|
|
65912
65958
|
{
|
|
65913
65959
|
this.LinePoint=[];
|
|
65914
65960
|
if (this.IsFrameMinSize()) return;
|
|
65961
|
+
if (!this.IsShow) return;
|
|
65962
|
+
|
|
65915
65963
|
var bCheckXY=true;
|
|
65916
65964
|
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
65917
65965
|
if (!drawPoint) return;
|
|
@@ -94649,6 +94697,15 @@ function Node(ErrorHandler)
|
|
|
94649
94697
|
return;
|
|
94650
94698
|
}
|
|
94651
94699
|
|
|
94700
|
+
//"MA.MA1"(10,5,5)"
|
|
94701
|
+
if (callee.Type==Syntax.Literal)
|
|
94702
|
+
{
|
|
94703
|
+
var item={ ID:JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX, Args:args, FunctionName:callee.Value, DynamicName:callee.Value };
|
|
94704
|
+
if (token) item.Token={ Index:token.Start, Line:token.LineNumber };
|
|
94705
|
+
this.ExecuteIndex.push(item);
|
|
94706
|
+
return;
|
|
94707
|
+
}
|
|
94708
|
+
|
|
94652
94709
|
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') //跨周期函数
|
|
94653
94710
|
{
|
|
94654
94711
|
var periodName=args[0].Value;
|
|
@@ -108638,6 +108695,98 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108638
108695
|
|
|
108639
108696
|
}
|
|
108640
108697
|
|
|
108698
|
+
this.CallDynamicScriptIndex=function(job, varTable)
|
|
108699
|
+
{
|
|
108700
|
+
var callInfo=job.DynamicName;
|
|
108701
|
+
var indexInfo={ Job:job, PeriodID:this.Period , Symbol:this.Symbol };
|
|
108702
|
+
if (!this.ReadIndexFunctionValue(callInfo,indexInfo)) //读取指标
|
|
108703
|
+
{
|
|
108704
|
+
var token=job.Token;
|
|
108705
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() Error: '${callInfo}' ${indexInfo.Error}`);
|
|
108706
|
+
}
|
|
108707
|
+
|
|
108708
|
+
var systemIndex=new JSIndexScript(); //系统指标
|
|
108709
|
+
var systemItem=systemIndex.Get(indexInfo.Name);
|
|
108710
|
+
if (!systemItem)
|
|
108711
|
+
{
|
|
108712
|
+
var token=job.Token;
|
|
108713
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() Error: '${callInfo}' ${indexInfo.Name} 指标不存在`);
|
|
108714
|
+
}
|
|
108715
|
+
|
|
108716
|
+
indexInfo.SytemIndex=systemItem;
|
|
108717
|
+
if (!this.ReadDynamicIndexArgumentValue(job.Args, indexInfo, varTable))
|
|
108718
|
+
{
|
|
108719
|
+
var token=job.Token;
|
|
108720
|
+
this.Execute.ErrorHandler.ThrowError(token.Index,token.Line,0,`CallDynamicScriptIndex() ${indexInfo.Name} 指标参数错误 : ${indexInfo.Error} `);
|
|
108721
|
+
}
|
|
108722
|
+
|
|
108723
|
+
JSConsole.Complier.Log('[JSSymbolData::CallMemberScriptIndex] call script index', indexInfo);
|
|
108724
|
+
|
|
108725
|
+
var dateTimeRange=this.Data.GetDateRange();
|
|
108726
|
+
|
|
108727
|
+
var option=
|
|
108728
|
+
{
|
|
108729
|
+
HQDataType:this.DataType,
|
|
108730
|
+
Symbol:indexInfo.Symbol,
|
|
108731
|
+
Name:'',
|
|
108732
|
+
Right:this.Right, //复权
|
|
108733
|
+
Period:indexInfo.PeriodID, //周期
|
|
108734
|
+
Data:null,
|
|
108735
|
+
SourceData:null,
|
|
108736
|
+
Callback:(outVar,job, symbolData)=> {
|
|
108737
|
+
this.RecvDynamicScriptIndexData(outVar,job,symbolData);
|
|
108738
|
+
this.Execute.RunNextJob();
|
|
108739
|
+
},
|
|
108740
|
+
CallbackParam:indexInfo,
|
|
108741
|
+
Async:true,
|
|
108742
|
+
MaxRequestDataCount:this.MaxRequestDataCount+30*2,
|
|
108743
|
+
MaxRequestMinuteDayCount:this.MaxRequestMinuteDayCount+2,
|
|
108744
|
+
Arguments:indexInfo.Args,
|
|
108745
|
+
//Condition:this.Condition,
|
|
108746
|
+
IsBeforeData:this.IsBeforeData,
|
|
108747
|
+
NetworkFilter:this.NetworkFilter,
|
|
108748
|
+
IsApiPeriod:this.IsApiPeriod,
|
|
108749
|
+
KLineRange:dateTimeRange //K线数据范围
|
|
108750
|
+
};
|
|
108751
|
+
|
|
108752
|
+
//执行脚本
|
|
108753
|
+
var run=JSComplier.Execute(systemItem.Script,option,(error, indexInfo)=>{this.ExecuteScriptIndexError(error,indexInfo)});
|
|
108754
|
+
}
|
|
108755
|
+
|
|
108756
|
+
this.ReadDynamicIndexArgumentValue=function(args, result, varTable)
|
|
108757
|
+
{
|
|
108758
|
+
result.Args=[];
|
|
108759
|
+
for(var i =0;i<result.SytemIndex.Args.length; ++i) //复制参数
|
|
108760
|
+
{
|
|
108761
|
+
var item=result.SytemIndex.Args[i];
|
|
108762
|
+
result.Args.push({ Value:item.Value, Name:item.Name, IsDefault:true });
|
|
108763
|
+
}
|
|
108764
|
+
|
|
108765
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(args)) return true;
|
|
108766
|
+
|
|
108767
|
+
for(var i=0;i<args.length;++i)
|
|
108768
|
+
{
|
|
108769
|
+
var item=args[i];
|
|
108770
|
+
var argItem=result.Args[i];
|
|
108771
|
+
if (!argItem) continue;
|
|
108772
|
+
if (item.Type==Syntax.Literal)
|
|
108773
|
+
{
|
|
108774
|
+
argItem.Value=item.Value;
|
|
108775
|
+
argItem.IsDefault=false;
|
|
108776
|
+
}
|
|
108777
|
+
else if (item.Type==Syntax.Identifier) //支持传参
|
|
108778
|
+
{
|
|
108779
|
+
if (varTable.has(item.Name))
|
|
108780
|
+
{
|
|
108781
|
+
argItem.Value=varTable.get(item.Name);
|
|
108782
|
+
argItem.IsDefault=false;
|
|
108783
|
+
}
|
|
108784
|
+
}
|
|
108785
|
+
}
|
|
108786
|
+
|
|
108787
|
+
return true;
|
|
108788
|
+
}
|
|
108789
|
+
|
|
108641
108790
|
/*****************************************************************************************************************************
|
|
108642
108791
|
脚本调用
|
|
108643
108792
|
|
|
@@ -108651,10 +108800,13 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108651
108800
|
CALCSTOCKINDEX('SH600000','KDJ',3)表示上证600000的KDJ指标第3个输出即J之值,第一个参数可在前面加SZ(深市),SH(沪市),BJ(京市),或市场_,,
|
|
108652
108801
|
CALCSTOCKINDEX('47_IFL0','MACD',2)表示IFL0品种的MACD指标第2个输出值.
|
|
108653
108802
|
|
|
108803
|
+
"MA.MA1"(6,12,18)
|
|
108804
|
+
|
|
108654
108805
|
*******************************************************************************************************************************/
|
|
108655
|
-
this.CallScriptIndex=function(job)
|
|
108806
|
+
this.CallScriptIndex=function(job, varTable)
|
|
108656
108807
|
{
|
|
108657
108808
|
if (job.Member) return this.CallMemberScriptIndex(job);
|
|
108809
|
+
if (job.DynamicName) return this.CallDynamicScriptIndex(job, varTable);
|
|
108658
108810
|
|
|
108659
108811
|
if (!job.Args || !(job.Args.length>=2))
|
|
108660
108812
|
{
|
|
@@ -108767,6 +108919,42 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
108767
108919
|
}
|
|
108768
108920
|
}
|
|
108769
108921
|
|
|
108922
|
+
this.RecvDynamicScriptIndexData=function(outVar,indexInfo,symbolData)
|
|
108923
|
+
{
|
|
108924
|
+
JSConsole.Complier.Log('[JSSymbolData::RecvDynamicScriptIndexData] ', outVar, indexInfo, symbolData);
|
|
108925
|
+
var kLine=symbolData.Data.Data;
|
|
108926
|
+
var aryOutVar=outVar;
|
|
108927
|
+
var data=this.Data.FitKLineIndex(kLine,aryOutVar,this.Period,indexInfo.PeriodID);
|
|
108928
|
+
|
|
108929
|
+
var objName=indexInfo.Name;
|
|
108930
|
+
var memberValue={};
|
|
108931
|
+
if (this.Execute.VarTable.has(objName))
|
|
108932
|
+
memberValue=this.Execute.VarTable.get(objName);
|
|
108933
|
+
else
|
|
108934
|
+
this.Execute.VarTable.set(objName, memberValue);
|
|
108935
|
+
|
|
108936
|
+
var strValue="";
|
|
108937
|
+
for(var i=0; i<indexInfo.Args.length; ++i)
|
|
108938
|
+
{
|
|
108939
|
+
var item=indexInfo.Args[i];
|
|
108940
|
+
if (item.IsDefault===false)
|
|
108941
|
+
{
|
|
108942
|
+
if (strValue.length>0) strValue+=",";
|
|
108943
|
+
strValue+=`${item.Value}`;
|
|
108944
|
+
}
|
|
108945
|
+
}
|
|
108946
|
+
var strArgs=`(${strValue})`;
|
|
108947
|
+
|
|
108948
|
+
//保存所有的指标数据, 下面用到了就可以不用算了
|
|
108949
|
+
for(var i=0; i<data.length; ++i)
|
|
108950
|
+
{
|
|
108951
|
+
var key=`${outVar[i].Name}#${strArgs}`;
|
|
108952
|
+
if (indexInfo.Period) key+='#'+indexInfo.Period; //带周期的变量
|
|
108953
|
+
|
|
108954
|
+
memberValue[key]=data[i].Data;
|
|
108955
|
+
}
|
|
108956
|
+
}
|
|
108957
|
+
|
|
108770
108958
|
this.RecvScriptIndexData=function(outVar,indexInfo,symbolData)
|
|
108771
108959
|
{
|
|
108772
108960
|
var key=this.GenerateScriptIndexKey(indexInfo);
|
|
@@ -109640,7 +109828,8 @@ var JS_EXECUTE_JOB_ID=
|
|
|
109640
109828
|
//KDJ.K , KDJ.K#WEEK
|
|
109641
109829
|
//STKINDI('600000.sh','MA.MA1#WEEK',5,10,20,30,60,120);
|
|
109642
109830
|
//CALCSTOCKINDEX('SH600000','KDJ',3)表示上证600000的KDJ指标第3个输出即J之值,第一个参数可在前面加SZ(深市),SH(沪市),BJ(京市)
|
|
109643
|
-
|
|
109831
|
+
//"MA.MA(5,5,5)" 调用动态指标
|
|
109832
|
+
JOB_EXECUTE_INDEX:30010,
|
|
109644
109833
|
|
|
109645
109834
|
JOB_RUN_SCRIPT:10000, //执行脚本
|
|
109646
109835
|
|
|
@@ -109959,7 +110148,7 @@ function JSExecute(ast,option)
|
|
|
109959
110148
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_CUSTOM_API_DATA:
|
|
109960
110149
|
return this.SymbolData.DownloadCustomAPIData(jobItem);
|
|
109961
110150
|
case JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX:
|
|
109962
|
-
return this.SymbolData.CallScriptIndex(jobItem);
|
|
110151
|
+
return this.SymbolData.CallScriptIndex(jobItem, this.VarTable);
|
|
109963
110152
|
|
|
109964
110153
|
case JS_EXECUTE_JOB_ID.JOB_RUN_SCRIPT:
|
|
109965
110154
|
if (this.Debug===1 && this.DebugFilter)
|
|
@@ -110939,6 +111128,35 @@ function JSExecute(ast,option)
|
|
|
110939
111128
|
args.push(value);
|
|
110940
111129
|
}
|
|
110941
111130
|
|
|
111131
|
+
if (node.Callee.Type==Syntax.Literal)
|
|
111132
|
+
{
|
|
111133
|
+
var dynamicName=node.Callee.Value;
|
|
111134
|
+
var aryValue=dynamicName.split(".");
|
|
111135
|
+
if (aryValue.length!=2)
|
|
111136
|
+
{
|
|
111137
|
+
this.ThrowUnexpectedNode(node,`调用指标格式'${dynamicName}'错误`);
|
|
111138
|
+
}
|
|
111139
|
+
|
|
111140
|
+
var name=aryValue[0];
|
|
111141
|
+
var outName=aryValue[1];
|
|
111142
|
+
var strValue="";
|
|
111143
|
+
for(var i=0; i<args.length; ++i)
|
|
111144
|
+
{
|
|
111145
|
+
var value=args[i];
|
|
111146
|
+
if (strValue.length>0) strValue+=",";
|
|
111147
|
+
strValue+=`${value}`;
|
|
111148
|
+
}
|
|
111149
|
+
var strArgs=`(${strValue})`;
|
|
111150
|
+
var key=`${outName}#${strArgs}`;
|
|
111151
|
+
|
|
111152
|
+
node.Out=[];
|
|
111153
|
+
if (!this.VarTable.has(name)) return node.Out;
|
|
111154
|
+
var indexData=this.VarTable.get(name);
|
|
111155
|
+
var value=indexData[key];
|
|
111156
|
+
if (value) node.Out=value;
|
|
111157
|
+
return node.Out;
|
|
111158
|
+
}
|
|
111159
|
+
|
|
110942
111160
|
if (funcName==="IFC")
|
|
110943
111161
|
{
|
|
110944
111162
|
//IFC(X,A,B)若X不为0则执行A,否则执行B.IFC与IF函数的区别:根据X的值来选择性执行A、B表达式.
|
|
@@ -111944,6 +112162,13 @@ function JSExplainer(ast,option)
|
|
|
111944
112162
|
args.push(value);
|
|
111945
112163
|
}
|
|
111946
112164
|
|
|
112165
|
+
if (node.Callee.Type==Syntax.Literal)
|
|
112166
|
+
{
|
|
112167
|
+
var dynamicName=node.Callee.Value;
|
|
112168
|
+
node.Out=`指标引用'${dynamicName}'`;
|
|
112169
|
+
return node.Out;
|
|
112170
|
+
}
|
|
112171
|
+
|
|
111947
112172
|
JSConsole.Complier.Log('[JSExplainer::VisitCallExpression]' , funcName, '(', args.toString() ,')');
|
|
111948
112173
|
|
|
111949
112174
|
if (g_JSComplierResource.IsCustomFunction(funcName))
|
|
@@ -129854,7 +130079,7 @@ function ScrollBarBGChart()
|
|
|
129854
130079
|
|
|
129855
130080
|
|
|
129856
130081
|
|
|
129857
|
-
var HQCHART_VERSION="1.1.
|
|
130082
|
+
var HQCHART_VERSION="1.1.13018";
|
|
129858
130083
|
|
|
129859
130084
|
function PrintHQChartVersion()
|
|
129860
130085
|
{
|