hqchart 1.1.15160 → 1.1.15168
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 +216 -149
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +236 -4
- package/src/jscommon/umychart.js +62 -5
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +299 -10
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +299 -10
|
@@ -12599,7 +12599,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12599
12599
|
pt.X=this.Frame.GetXFromIndex(this.CursorIndex); //X轴动态变的
|
|
12600
12600
|
if (this.ChartCorssCursor)
|
|
12601
12601
|
{
|
|
12602
|
-
if (this.ChartCorssCursor.Status
|
|
12602
|
+
if ((this.ChartCorssCursor.Status&JSCHART_CORSSCURSOR_STATUS_ID.LINE_ID)>0)
|
|
12603
12603
|
{
|
|
12604
12604
|
|
|
12605
12605
|
}
|
|
@@ -14224,6 +14224,60 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14224
14224
|
return true;
|
|
14225
14225
|
}
|
|
14226
14226
|
|
|
14227
|
+
/*
|
|
14228
|
+
//对比画图
|
|
14229
|
+
this.CompareChartDrawPicture=function(aryData)
|
|
14230
|
+
{
|
|
14231
|
+
var mapData=new Map();
|
|
14232
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryData))
|
|
14233
|
+
{
|
|
14234
|
+
for(var i=0;i<aryData.length;++i)
|
|
14235
|
+
{
|
|
14236
|
+
var item=aryData[i];
|
|
14237
|
+
if (!item.Guid) continue;
|
|
14238
|
+
mapData.set(item.Guid, item);
|
|
14239
|
+
}
|
|
14240
|
+
}
|
|
14241
|
+
|
|
14242
|
+
var mapChart=new Map();
|
|
14243
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.ChartDrawPicture))
|
|
14244
|
+
{
|
|
14245
|
+
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
14246
|
+
{
|
|
14247
|
+
var item=this.ChartDrawPicture[i];
|
|
14248
|
+
mapChart.set(item.Guid, item);
|
|
14249
|
+
}
|
|
14250
|
+
}
|
|
14251
|
+
|
|
14252
|
+
var aryDelete=[], aryEqual=[], aryNew=[];
|
|
14253
|
+
|
|
14254
|
+
for(var mapItem of mapData)
|
|
14255
|
+
{
|
|
14256
|
+
var item=mapItem[1];
|
|
14257
|
+
if (mapChart.has(item.Guid)) //存在的
|
|
14258
|
+
{
|
|
14259
|
+
var chart=mapChart.get(item.Guid);
|
|
14260
|
+
aryEqual.push({ Chart:chart, Data:item });
|
|
14261
|
+
}
|
|
14262
|
+
else
|
|
14263
|
+
{
|
|
14264
|
+
aryNew.push({ Data:item }); //新建
|
|
14265
|
+
}
|
|
14266
|
+
}
|
|
14267
|
+
|
|
14268
|
+
for(var mapItem of mapChart)
|
|
14269
|
+
{
|
|
14270
|
+
var item=mapItem[1];
|
|
14271
|
+
if (!mapData.has(item.Guid))
|
|
14272
|
+
{
|
|
14273
|
+
aryDelete.push({ Chart:item }); //删除的
|
|
14274
|
+
}
|
|
14275
|
+
}
|
|
14276
|
+
|
|
14277
|
+
return { AryDelete:aryDelete, AryNew:aryNew, AryEqual:aryEqual };
|
|
14278
|
+
}
|
|
14279
|
+
*/
|
|
14280
|
+
|
|
14227
14281
|
//清空所有的画线工具 option={ Draw:false/true }
|
|
14228
14282
|
this.ClearChartDrawPicture=function(drawPicture, option)
|
|
14229
14283
|
{
|
|
@@ -19860,7 +19914,8 @@ function AverageWidthFrame()
|
|
|
19860
19914
|
this.Canvas.fillRect(rectLeft,bgTop,itemText.Width,textHeight);
|
|
19861
19915
|
}
|
|
19862
19916
|
|
|
19863
|
-
this.Canvas.fillStyle
|
|
19917
|
+
if (itemText.TextColor) this.Canvas.fillStyle=itemText.TextColor;
|
|
19918
|
+
else this.Canvas.fillStyle = item.TextColor;
|
|
19864
19919
|
this.Canvas.fillText(itemText.Text, textLeft - 1*pixelTatio, yText);
|
|
19865
19920
|
}
|
|
19866
19921
|
|
|
@@ -19874,7 +19929,8 @@ function AverageWidthFrame()
|
|
|
19874
19929
|
}
|
|
19875
19930
|
}
|
|
19876
19931
|
}
|
|
19877
|
-
|
|
19932
|
+
|
|
19933
|
+
if (item.Message[1]) // 右
|
|
19878
19934
|
{
|
|
19879
19935
|
if (borderRight<10 || position==1)
|
|
19880
19936
|
{
|
|
@@ -66700,6 +66756,7 @@ function DynamicChartTitlePainting()
|
|
|
66700
66756
|
if (option)
|
|
66701
66757
|
{
|
|
66702
66758
|
if (option.DynamicTitle===true) this.DynamicTitle={ OutName:null, OutValue:null }; //主图胴动态标题
|
|
66759
|
+
if (option.ArgumentsText===true) this.ArgumentsText=null;
|
|
66703
66760
|
}
|
|
66704
66761
|
}
|
|
66705
66762
|
|
|
@@ -88648,7 +88705,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88648
88705
|
|
|
88649
88706
|
this.RecvRealtimeData=function(data)
|
|
88650
88707
|
{
|
|
88651
|
-
if (this.IsOnTouch==true) return;
|
|
88708
|
+
if (this.IsOnTouch==true) return; //正在操作手势不更新数据
|
|
88652
88709
|
if (this.IsPauseUpdateByKeyboard()) return; //正在操作键盘不更新数据
|
|
88653
88710
|
|
|
88654
88711
|
if (data.Ver==3.0)
|
|
@@ -89732,7 +89789,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
89732
89789
|
//清空东条标题
|
|
89733
89790
|
var titleIndex=windowIndex+1;
|
|
89734
89791
|
var chartTitle=this.TitlePaint[titleIndex];
|
|
89735
|
-
if (chartTitle) chartTitle.Clear({ DynamicTitle:true });
|
|
89792
|
+
if (chartTitle) chartTitle.Clear({ DynamicTitle:true , ArgumentsText:true});
|
|
89736
89793
|
}
|
|
89737
89794
|
|
|
89738
89795
|
//显示隐藏主图K线
|
|
@@ -110168,12 +110225,23 @@ var Character =
|
|
|
110168
110225
|
return (cp >= 0x30 && cp <= 0x39) || (cp >= 0x41 && cp <= 0x46) || (cp >= 0x61 && cp <= 0x66); // a..f
|
|
110169
110226
|
},
|
|
110170
110227
|
|
|
110171
|
-
|
|
110228
|
+
IsOctalDigit: function (cp)
|
|
110172
110229
|
{
|
|
110173
110230
|
return (cp >= 0x30 && cp <= 0x37); // 0..7
|
|
110174
110231
|
}
|
|
110175
110232
|
}
|
|
110176
110233
|
|
|
110234
|
+
|
|
110235
|
+
function HexValue(ch)
|
|
110236
|
+
{
|
|
110237
|
+
return '0123456789abcdef'.indexOf(ch.toLowerCase());
|
|
110238
|
+
}
|
|
110239
|
+
|
|
110240
|
+
function OctalValue(ch)
|
|
110241
|
+
{
|
|
110242
|
+
return '01234567'.indexOf(ch);
|
|
110243
|
+
}
|
|
110244
|
+
|
|
110177
110245
|
var TOKEN_NAME={};
|
|
110178
110246
|
TOKEN_NAME[1 /* BooleanLiteral */] = 'Boolean';
|
|
110179
110247
|
TOKEN_NAME[2 /* EOF */] = '<end>';
|
|
@@ -110272,6 +110340,7 @@ JSComplierHelper.GetConvertValueName=function(funcName)
|
|
|
110272
110340
|
function ErrorHandler()
|
|
110273
110341
|
{
|
|
110274
110342
|
this.Error=[];
|
|
110343
|
+
this.IsTolerant=false;
|
|
110275
110344
|
|
|
110276
110345
|
this.RecordError=function(error)
|
|
110277
110346
|
{
|
|
@@ -110298,7 +110367,7 @@ function ErrorHandler()
|
|
|
110298
110367
|
return error;
|
|
110299
110368
|
}
|
|
110300
110369
|
|
|
110301
|
-
this.CreateError=function(index, line, col, description, word)
|
|
110370
|
+
this.CreateError=function(index, line, col, description, word=null)
|
|
110302
110371
|
{
|
|
110303
110372
|
let msg='Line ' + line + ': ' + description;
|
|
110304
110373
|
let error=this.ConstructError(msg,col);
|
|
@@ -110315,6 +110384,13 @@ function ErrorHandler()
|
|
|
110315
110384
|
throw error;
|
|
110316
110385
|
}
|
|
110317
110386
|
|
|
110387
|
+
this.TolerateError=function(index, line, col, description)
|
|
110388
|
+
{
|
|
110389
|
+
const error = this.CreateError(index, line, col, description);
|
|
110390
|
+
if (this.IsTolerant) this.RecordError(error);
|
|
110391
|
+
else throw error;
|
|
110392
|
+
}
|
|
110393
|
+
|
|
110318
110394
|
//重新下载数据
|
|
110319
110395
|
this.ThrowDownloadJob=function(index, line, col, description,job)
|
|
110320
110396
|
{
|
|
@@ -110352,12 +110428,22 @@ function Scanner(code, ErrorHandler)
|
|
|
110352
110428
|
return this.Index>=this.Length;
|
|
110353
110429
|
}
|
|
110354
110430
|
|
|
110431
|
+
this.ThrowUnexpectedToken=function(message=Messages.UnexpectedTokenIllegal)
|
|
110432
|
+
{
|
|
110433
|
+
return this.ErrorHandler.ThrowError(this.Index, this.LineNumber, this.Index - this.LineStart + 1, message);
|
|
110434
|
+
}
|
|
110435
|
+
|
|
110436
|
+
this.TolerateUnexpectedToken=function(message = Messages.UnexpectedTokenIllegal)
|
|
110437
|
+
{
|
|
110438
|
+
this.ErrorHandler.TolerateError(this.Index, this.LineNumber, this.Index - this.LineStart + 1, message);
|
|
110439
|
+
}
|
|
110440
|
+
|
|
110355
110441
|
this.IsKeyword=function(id)
|
|
110356
110442
|
{
|
|
110357
110443
|
return false;
|
|
110358
110444
|
}
|
|
110359
110445
|
|
|
110360
|
-
this.CodePointAt
|
|
110446
|
+
this.CodePointAt=function (i)
|
|
110361
110447
|
{
|
|
110362
110448
|
let cp = this.Source.charCodeAt(i);
|
|
110363
110449
|
if (cp >= 0xD800 && cp <= 0xDBFF)
|
|
@@ -110371,6 +110457,27 @@ function Scanner(code, ErrorHandler)
|
|
|
110371
110457
|
return cp;
|
|
110372
110458
|
}
|
|
110373
110459
|
|
|
110460
|
+
//8进制->10进制
|
|
110461
|
+
this.OctalToDecimal=function(ch)
|
|
110462
|
+
{
|
|
110463
|
+
// \0 is not octal escape sequence
|
|
110464
|
+
let octal = (ch !== '0');
|
|
110465
|
+
let code = OctalValue(ch);
|
|
110466
|
+
|
|
110467
|
+
if (!this.IsEOF() && Character.IsOctalDigit(this.Source.charCodeAt(this.Index)))
|
|
110468
|
+
{
|
|
110469
|
+
octal = true;
|
|
110470
|
+
code = code * 8 + OctalValue(this.Source[this.Index++]);
|
|
110471
|
+
|
|
110472
|
+
// 3 digits are only allowed when string starts
|
|
110473
|
+
// with 0, 1, 2, 3
|
|
110474
|
+
if ('0123'.indexOf(ch) >= 0 && !this.IsEOF() && Character.IsOctalDigit(this.Source.charCodeAt(this.Index)))
|
|
110475
|
+
code = code * 8 + OctalValue(this.Source[this.Index++]);
|
|
110476
|
+
}
|
|
110477
|
+
|
|
110478
|
+
return { Code: code, Octal: octal };
|
|
110479
|
+
}
|
|
110480
|
+
|
|
110374
110481
|
this.Lex=function()
|
|
110375
110482
|
{
|
|
110376
110483
|
if (this.IsEOF()) return { Type:2/*EOF*/, Value:'', LineNumber:this.LineNumber, LineStart:this.LineStart, Start:this.Index, End:this.Index };
|
|
@@ -110457,6 +110564,123 @@ function Scanner(code, ErrorHandler)
|
|
|
110457
110564
|
return this.Source.slice(start,this.Index);
|
|
110458
110565
|
}
|
|
110459
110566
|
|
|
110567
|
+
this.GetComplexIdentifier=function()
|
|
110568
|
+
{
|
|
110569
|
+
let cp = this.CodePointAt(this.Index);
|
|
110570
|
+
let id = Character.FromCodePoint(cp);
|
|
110571
|
+
this.Index += id.length;
|
|
110572
|
+
|
|
110573
|
+
// '\u' (U+005C, U+0075) denotes an escaped character.
|
|
110574
|
+
let ch;
|
|
110575
|
+
if (cp === 0x5C)
|
|
110576
|
+
{
|
|
110577
|
+
if (this.Source.charCodeAt(this.Index) !== 0x75)
|
|
110578
|
+
this.ThrowUnexpectedToken();
|
|
110579
|
+
|
|
110580
|
+
++this.Index;
|
|
110581
|
+
if (this.Source[this.Index] === '{')
|
|
110582
|
+
{
|
|
110583
|
+
++this.Index;
|
|
110584
|
+
ch = this.ScanUnicodeCodePointEscape();
|
|
110585
|
+
}
|
|
110586
|
+
else
|
|
110587
|
+
{
|
|
110588
|
+
ch = this.ScanHexEscape('u');
|
|
110589
|
+
if (ch === null || ch === '\\' || !Character.IsIdentifierStart(ch.charCodeAt(0)))
|
|
110590
|
+
this.ThrowUnexpectedToken();
|
|
110591
|
+
}
|
|
110592
|
+
id = ch;
|
|
110593
|
+
}
|
|
110594
|
+
|
|
110595
|
+
while (!this.IsEOF())
|
|
110596
|
+
{
|
|
110597
|
+
cp = this.CodePointAt(this.Index);
|
|
110598
|
+
if (!Character.IsIdentifierPart(cp))
|
|
110599
|
+
break;
|
|
110600
|
+
|
|
110601
|
+
ch = Character.FromCodePoint(cp);
|
|
110602
|
+
id += ch;
|
|
110603
|
+
this.Index += ch.length;
|
|
110604
|
+
|
|
110605
|
+
// '\u' (U+005C, U+0075) denotes an escaped character.
|
|
110606
|
+
if (cp === 0x5C)
|
|
110607
|
+
{
|
|
110608
|
+
id = id.substring(0, id.length - 1);
|
|
110609
|
+
if (this.Source.charCodeAt(this.Index) !== 0x75)
|
|
110610
|
+
this.ThrowUnexpectedToken();
|
|
110611
|
+
|
|
110612
|
+
++this.Index;
|
|
110613
|
+
if (this.Source[this.Index] === '{')
|
|
110614
|
+
{
|
|
110615
|
+
++this.Index;
|
|
110616
|
+
ch = this.ScanUnicodeCodePointEscape();
|
|
110617
|
+
}
|
|
110618
|
+
else
|
|
110619
|
+
{
|
|
110620
|
+
ch = this.ScanHexEscape('u');
|
|
110621
|
+
if (ch === null || ch === '\\' || !Character.IsIdentifierPart(ch.charCodeAt(0)))
|
|
110622
|
+
this.ThrowUnexpectedToken();
|
|
110623
|
+
}
|
|
110624
|
+
id += ch;
|
|
110625
|
+
}
|
|
110626
|
+
}
|
|
110627
|
+
|
|
110628
|
+
return id;
|
|
110629
|
+
}
|
|
110630
|
+
|
|
110631
|
+
this.ScanUnicodeCodePointEscape=function()
|
|
110632
|
+
{
|
|
110633
|
+
const result = this.TryToScanUnicodeCodePointEscape();
|
|
110634
|
+
if (result === null)
|
|
110635
|
+
return this.ThrowUnexpectedToken();
|
|
110636
|
+
|
|
110637
|
+
return result;
|
|
110638
|
+
}
|
|
110639
|
+
|
|
110640
|
+
this.TryToScanUnicodeCodePointEscape=function()
|
|
110641
|
+
{
|
|
110642
|
+
let ch = this.Source[this.Index];
|
|
110643
|
+
let code = 0;
|
|
110644
|
+
|
|
110645
|
+
// At least, one hex digit is required.
|
|
110646
|
+
if (ch === '}')
|
|
110647
|
+
return null;
|
|
110648
|
+
|
|
110649
|
+
while (!this.IsEOF())
|
|
110650
|
+
{
|
|
110651
|
+
ch = this.Source[this.Index++];
|
|
110652
|
+
if (!Character.IsHexDigit(ch.charCodeAt(0)))
|
|
110653
|
+
break;
|
|
110654
|
+
|
|
110655
|
+
code = code * 16 + HexValue(ch);
|
|
110656
|
+
}
|
|
110657
|
+
|
|
110658
|
+
if (code > 0x10FFFF || ch !== '}')
|
|
110659
|
+
return null;
|
|
110660
|
+
|
|
110661
|
+
return Character.FromCodePoint(code);
|
|
110662
|
+
}
|
|
110663
|
+
|
|
110664
|
+
this.ScanHexEscape=function(prefix)
|
|
110665
|
+
{
|
|
110666
|
+
const len = (prefix === 'u') ? 4 : 2;
|
|
110667
|
+
let code = 0;
|
|
110668
|
+
|
|
110669
|
+
for (let i = 0; i < len; ++i)
|
|
110670
|
+
{
|
|
110671
|
+
if (!this.IsEOF() && Character.IsHexDigit(this.Source.charCodeAt(this.Index)))
|
|
110672
|
+
{
|
|
110673
|
+
code = code * 16 + HexValue(this.source[this.Index++]);
|
|
110674
|
+
}
|
|
110675
|
+
else
|
|
110676
|
+
{
|
|
110677
|
+
return null;
|
|
110678
|
+
}
|
|
110679
|
+
}
|
|
110680
|
+
|
|
110681
|
+
return String.fromCharCode(code);
|
|
110682
|
+
}
|
|
110683
|
+
|
|
110460
110684
|
//操作符 https://tc39.github.io/ecma262/#sec-punctuators
|
|
110461
110685
|
this.ScanPunctuator=function()
|
|
110462
110686
|
{
|
|
@@ -110528,7 +110752,72 @@ function Scanner(code, ErrorHandler)
|
|
|
110528
110752
|
}
|
|
110529
110753
|
else if (ch=='\\') //字符串转义
|
|
110530
110754
|
{
|
|
110531
|
-
|
|
110755
|
+
ch = this.Source[this.Index++];
|
|
110756
|
+
if (!ch || !Character.IsLineTerminator(ch.charCodeAt(0)))
|
|
110757
|
+
{
|
|
110758
|
+
switch (ch)
|
|
110759
|
+
{
|
|
110760
|
+
case 'u':
|
|
110761
|
+
if (this.Source[this.Index] === '{')
|
|
110762
|
+
{
|
|
110763
|
+
++this.Index;
|
|
110764
|
+
str += this.ScanUnicodeCodePointEscape();
|
|
110765
|
+
}
|
|
110766
|
+
else
|
|
110767
|
+
{
|
|
110768
|
+
const unescapedChar = this.ScanHexEscape(ch);
|
|
110769
|
+
if (unescapedChar === null)
|
|
110770
|
+
this.ThrowUnexpectedToken();
|
|
110771
|
+
|
|
110772
|
+
str += unescapedChar;
|
|
110773
|
+
}
|
|
110774
|
+
break;
|
|
110775
|
+
case 'x': //十六进制 它的转义规则:\x<hex>,\x后跟上2位十六进制数
|
|
110776
|
+
const unescaped = this.ScanHexEscape(ch);
|
|
110777
|
+
if (unescaped === null)
|
|
110778
|
+
this.ThrowUnexpectedToken(Messages.InvalidHexEscapeSequence);
|
|
110779
|
+
|
|
110780
|
+
str += unescaped;
|
|
110781
|
+
break;
|
|
110782
|
+
case 'n': //换行符
|
|
110783
|
+
str += '\n';
|
|
110784
|
+
break;
|
|
110785
|
+
case 'r': //回车键
|
|
110786
|
+
str += '\r';
|
|
110787
|
+
break;
|
|
110788
|
+
case 't': //制表符
|
|
110789
|
+
str += '\t';
|
|
110790
|
+
break;
|
|
110791
|
+
case 'b': //后退键
|
|
110792
|
+
str += '\b';
|
|
110793
|
+
break;
|
|
110794
|
+
case 'f': //换页符
|
|
110795
|
+
str += '\f';
|
|
110796
|
+
break;
|
|
110797
|
+
case 'v': //垂直制表符
|
|
110798
|
+
str += '\x0B';
|
|
110799
|
+
break;
|
|
110800
|
+
case '8':
|
|
110801
|
+
case '9':
|
|
110802
|
+
str += ch;
|
|
110803
|
+
this.TolerateUnexpectedToken();
|
|
110804
|
+
break;
|
|
110805
|
+
default:
|
|
110806
|
+
if (ch && Character.IsOctalDigit(ch.charCodeAt(0))) //反斜杠后面跟3位八进制数,就代表一个转义字符
|
|
110807
|
+
{
|
|
110808
|
+
const octToDec = this.OctalToDecimal(ch);
|
|
110809
|
+
|
|
110810
|
+
octal = octToDec.Octal || octal;
|
|
110811
|
+
str += String.fromCharCode(octToDec.Code);
|
|
110812
|
+
}
|
|
110813
|
+
else
|
|
110814
|
+
{
|
|
110815
|
+
str += ch;
|
|
110816
|
+
}
|
|
110817
|
+
break;
|
|
110818
|
+
}
|
|
110819
|
+
}
|
|
110820
|
+
|
|
110532
110821
|
}
|
|
110533
110822
|
else if (Character.IsLineTerminator(ch.charCodeAt(0)))
|
|
110534
110823
|
{
|
|
@@ -153803,7 +154092,7 @@ function ScrollBarBGChart()
|
|
|
153803
154092
|
|
|
153804
154093
|
|
|
153805
154094
|
|
|
153806
|
-
var HQCHART_VERSION="1.1.
|
|
154095
|
+
var HQCHART_VERSION="1.1.15167";
|
|
153807
154096
|
|
|
153808
154097
|
function PrintHQChartVersion()
|
|
153809
154098
|
{
|