hqchart 1.1.13689 → 1.1.13694

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.
@@ -67,7 +67,7 @@ callback(hqchartData);}else if(varName=="HYBLOCK"){var hqchartData={DataType:1,D
67
67
  callback(hqchartData);}else if(varName=="DYBLOCK"){var hqchartData={DataType:1,Data:{Value:"上海板块"}};//返回品种所属地域..
68
68
  callback(hqchartData);}else if(varName=="CAPITAL"){var hqchartData={DataType:1,Data:{Value:29352177375}};// 当前流通股本,单位为手,债券1手为10张,其它为100
69
69
  callback(hqchartData);}else if(varName=="LARGEINTRDVOL"){//测试数据
70
- var kData=data.Self.Data;var hqchartData={DataType:2,Data:[]};for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];hqchartData.Data.push({Date:kItem.Date,Time:kItem.Time,Value:kItem.Vol*0.15});}callback(hqchartData);}else if(varName=="LARGEOUTTRDVOL"){//测试数据
70
+ var kData=data.Self.Data;var hqchartData={DataType:2,Data:[]};var testValue=0.15;for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];hqchartData.Data.push({Date:kItem.Date,Time:kItem.Time,Value:kItem.Vol*testValue});testValue+=0.01;if(testValue>0.23)testValue=0.15;}callback(hqchartData);}else if(varName=="LARGEOUTTRDVOL"){//测试数据
71
71
  var kData=data.Self.Data;var hqchartData={DataType:2,Data:[]};for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];hqchartData.Data.push({Date:kItem.Date,Time:kItem.Time,Value:kItem.Vol*0.17});}callback(hqchartData);}};HQData.CustomFunction_RequestData=function(data,callback){data.PreventDefault=true;var funcName=data.Request.Data.FunctionName;var hqchartData=null;if(funcName=='L2_VOL'){var args=data.Request.Data.JobItem.Args;var param=[args[0].Value,args[1].Value];var hqchartData={DataType:2,Data:[]};var kData=data.Self.Data;for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];hqchartData.Data.push({Date:kItem.Date,Time:kItem.Time,Value:kItem.Vol/3});}}callback(hqchartData);};HQData.CustomVarData_RequestData=function(data,callback){data.PreventDefault=true;var varName=data.Request.Data.VariantName;if(varName=="DCLOSE"){var hqchartData={DataType:2,Data:[]};var kData=data.Self.Data;for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];hqchartData.Data.push({Date:kItem.Date,Time:kItem.Time,Value:kItem.Close});}callback(hqchartData);}else{throw varName+" \u6CA1\u6709\u5BF9\u63A5. [HQData.CustomVarData_RequestData]";}};HQData.RequestOtherSymbolData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Data.symbol;var period=data.Request.Data.period;var right=data.Request.Data.right;var hqchartData=null;if(ChartData.IsDayPeriod(period,true))hqchartData=KLINE_DAY_DATA2;else if(ChartData.IsMinutePeriod(period,true))hqchartData=KLINE_MINUTE_DATA2;hqchartData.name=symbol;hqchartData.symbol=symbol;callback(hqchartData);};HQData.AnnouncementInfo_RequestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Symbol;var hqchartData={symbol:symbol,report:[]};var kData=data.HQChart.ChartPaint[0].Data;for(var i=0,j=1;i<kData.Data.length;++i){var kItem=kData.Data[i];if(i%10!=4)continue;var itemReport={releasedate:kItem.Date,time:kItem.Time,title:"\u516C\u544A("+j+") xxxx"};hqchartData.report.push(itemReport);++j;}callback(hqchartData);};HQData.PforecastInfo_RequestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Symbol;var hqchartData={symbol:symbol,report:[]};var kData=data.HQChart.ChartPaint[0].Data;for(var i=0,j=1;i<kData.Data.length;++i){var kItem=kData.Data[i];if(i%10!=4)continue;var itemReport={date:kItem.Date,time:kItem.Time,title:"\u516C\u544A("+j+") xxxx"};hqchartData.report.push(itemReport);++j;}callback(hqchartData);};HQData.InvestorInfo_RequestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Symbol;callback(TEST_NEWSINTERACT_DATA);};HQData.BlockTrading_RequestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Symbol;callback(TEST_BLOCK_TRADING_DATA);};HQData.TradeDetail_RequestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Symbol;callback(TEST_TRADE_DETAL_DATA);};HQData.RequestLatestData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Data.symbol[0];var id=data.Args[0];var value=1;switch(id){case 3:value=KLINE_1DAY_DATA.stock[0].yclose;break;case 4:value=KLINE_1DAY_DATA.stock[0].open;break;case 5:value=KLINE_1DAY_DATA.stock[0].high;break;case 6:value=KLINE_1DAY_DATA.stock[0].low;break;case 7:value=KLINE_1DAY_DATA.stock[0].price;break;case 8:value=KLINE_1DAY_DATA.stock[0].vol;break;}var hqchartData={symbol:symbol,ver:2.0,data:[{id:id,value:value}]};callback(hqchartData);};HQData.RequestOverlayHistoryData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Data.symbol;var hqchartData={symbol:symbol,name:symbol};if(symbol=="399001.sz")hqchartData.data=KLINE_DAY_OVERLAY_DATA2.data;else hqchartData.data=KLINE_DAY_OVERLAY_DATA.data;callback(hqchartData);};HQData.RequestOverlayHistoryMinuteData=function(data,callback){data.PreventDefault=true;var symbol=data.Request.Data.symbol;var hqchartData={symbol:symbol,name:symbol};hqchartData.data=KLINE_MINUTE_DATA2.data;callback(hqchartData);};HQData.Finance_RequestData=function(data,callback){data.PreventDefault=true;var id=data.Request.Data.id;var hqchartData=null;if(id==7)// 流通股本(随时间可能有变化)
72
72
  hqchartData=TEST_FINANCE_7.data;if(hqchartData)callback(hqchartData);};//////////////////////////////////////////////////////////////////////////////////////
73
73
  // 报价列表
@@ -9851,7 +9851,7 @@ if(!period)return;var _jobID2=JS_EXECUTE_JOB_ID.GetSectionFinanceID(args[2].Valu
9851
9851
  {var item={Name:callee.Name,ID:JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_CUSTOM_API_DATA,Args:args};if(token)item.Token={Index:token.Start,Line:token.LineNumber};this.IsAPIData.push(item);return;}var setStockDataName=new _set2.default(['CLOSE',"C",'VOL','V','OPEN','O','HIGH','H','LOW','L','AMOUNT','AMO','VOLINSTK']);if(setStockDataName.has(callee.Name)){var item={Name:callee.Name,ID:JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_OTHER_SYMBOL_DATA,Args:args};if(token)item.Token={Index:token.Start,Line:token.LineNumber};this.OtherSymbolData.push(item);return;}};this.VerifyMemberVariable=function(object,property,token){var item={ID:JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX,Member:{Object:object,Property:property}};if(token)item.Token={Index:token.Start,Line:token.LineNumber};this.ExecuteIndex.push(item);return;};this.ExpressionStatement=function(expression){return{Type:Syntax.ExpressionStatement,Expression:expression};};this.Script=function(body){return{Type:Syntax.Program,Body:body,SourceType:'通达信脚本'};};this.SequenceExpression=function(expression){return{Type:Syntax.SequenceExpression,Expression:expression};};this.BinaryExpression=function(operator,left,right){var logical=operator==='||'||operator==='&&'||operator=='AND'||operator=='OR';var type=logical?Syntax.LogicalExpression:Syntax.BinaryExpression;return{Type:type,Operator:operator,Left:left,Right:right};};this.Literal=function(value,raw,token){this.VerifySymbolLiteral(value,token);return{Type:Syntax.Literal,Value:value,Raw:raw};};this.Identifier=function(name,token){this.VerifySymbolVariable(name,token);return{Type:Syntax.Identifier,Name:name};};//成员变量, 不需要检测
9852
9852
  this.MemberIdentifier=function(name,token){return{Type:Syntax.Identifier,Name:name};};this.AssignmentExpression=function(operator,left,right){return{Type:Syntax.AssignmentExpression,Operator:operator,Left:left,Right:right};};this.UnaryExpression=function(operator,argument){return{Type:Syntax.UnaryExpression,Operator:operator,Argument:argument,Prefix:true};};this.EmptyStatement=function(){return{Type:Syntax.EmptyStatement};};this.CallExpression=function(callee,args,token){this.VerifySymbolFunction(callee,args,token);return{Type:Syntax.CallExpression,Callee:callee,Arguments:args};};this.StaticMemberExpression=function(object,property,token){this.VerifyMemberVariable(object,property,token);return{Type:Syntax.MemberExpression,Computed:false,Object:object,Property:property};};this.Directive=function(expression,directive){return{Type:Syntax.ExpressionStatement,Expression:expression,Directive:directive};};////////////////////////////////////////////////////////////////
9853
9853
  this.ThrowUnexpectedToken=function(token,message){throw this.UnexpectedTokenError(token,message);};this.UnexpectedTokenError=function(token,message){var msg=message||Messages.UnexpectedToken;var value='ILLEGAL';if(token){if(!message){}value=token.Value;}msg=msg.replace("%0",value);if(token&&typeof token.LineNumber=='number'){var index=token.Start;var _line=token.LineNumber;var column=-1;return this.ErrorHandler.CreateError(index,_line,column,msg);}};}function JSParser(code){this.ErrorHandler=new ErrorHandler();this.Scanner=new Scanner(code,this.ErrorHandler);this.Node=new Node(this.ErrorHandler);//节点创建
9854
- this.LookAhead={Type:2,Value:'',LineNumber:this.Scanner.LineNumber,LineStart:0,Start:0,End:0};this.HasLineTerminator=false;this.Context={IsModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,FirstCoverInitializedNameError:null,IsAssignmentTarget:false,IsBindingElement:false,InFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},Strict:false};this.PeratorPrecedence={')':0,';':0,',':0,']':0,'||':1,'OR':1,'&&':2,'AND':2,'|':3,'^':4,'&':5,'==':6,'=':6,'!=':6,'<>':6,'===':6,'!==':6,'<':7,'>':7,'<=':7,'>=':7,'<<':8,'>>':8,'>>>':8,'+':9,'-':9,'*':11,'/':11,'%':11};this.StartMarker={Index:0,Line:this.Scanner.LineNumber,Column:0};this.LastMarker={Index:0,Line:this.Scanner.LineNumber,Column:0};this.Initialize=function(){this.NextToken();this.LastMarker={Index:this.Scanner.Index,Line:this.Scanner.LineNumber,Column:this.Scanner.Index-this.Scanner.LineStart};};this.CreateNode=function(){return{Index:this.StartMarker.Index,Line:this.StartMarker.Line,Column:this.StartMarker.Column};};this.StartNode=function(token,lastLineStart){if(lastLineStart==void 0){lastLineStart=0;}var column=token.Start-token.LineStart;var line=token.LineNumber;if(column<0){column+=lastLineStart;line--;}return{Index:token.Start,Line:line,Column:column};};this.Match=function(value){return this.LookAhead.Type==7/*Punctuator*/&&this.LookAhead.Value==value;};this.Expect=function(value){var token=this.NextToken();if(token.Type!=7/*Punctuator*/||token.Value!=value)this.ThrowUnexpectedToken(token);};//是否是赋值操作符
9854
+ this.LookAhead={Type:2,Value:'',LineNumber:this.Scanner.LineNumber,LineStart:0,Start:0,End:0};this.HasLineTerminator=false;this.Context={IsModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,FirstCoverInitializedNameError:null,IsAssignmentTarget:false,IsBindingElement:false,InFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},Strict:false};this.PeratorPrecedence={')':0,';':0,',':0,']':0,'||':1,'OR':1,'&&':2,'AND':2,'|':3,'^':4,'&':5,'==':6,'=':6,'!=':6,'<>':6,'===':6,'!==':6,'<':7,'>':7,'<=':7,'>=':7,'<<':8,'>>':8,'>>>':8,'+':9,'-':9,'*':11,'/':11,'%':11};this.StartMarker={Index:0,Line:this.Scanner.LineNumber,Column:0};this.LastMarker={Index:0,Line:this.Scanner.LineNumber,Column:0};this.Initialize=function(){this.NextToken();this.LastMarker={Index:this.Scanner.Index,Line:this.Scanner.LineNumber,Column:this.Scanner.Index-this.Scanner.LineStart};};this.CreateNode=function(){return{Index:this.StartMarker.Index,Line:this.StartMarker.Line,Column:this.StartMarker.Column};};this.StartNode=function(token,lastLineStart){if(lastLineStart==void 0){lastLineStart=0;}var column=token.Start-token.LineStart;var line=token.LineNumber;if(column<0){column+=lastLineStart;line--;}return{Index:token.Start,Line:line,Column:column};};this.Match=function(value){return this.LookAhead.Type==7/*Punctuator*/&&this.LookAhead.Value==value;};this.Expect=function(value,message){var token=this.NextToken();if(token.Type!=7/*Punctuator*/||token.Value!=value)this.ThrowUnexpectedToken(token,message);};//是否是赋值操作符
9855
9855
  this.MatchAssign=function(){if(this.LookAhead.Type!=7/*Punctuator*/)return false;var op=this.LookAhead.Value;return op==':'||op==':=';};this.GetTokenRaw=function(token){return this.Scanner.Source.slice(token.Start,token.End);};this.NextToken=function(){var token=this.LookAhead;this.LastMarker.Index=this.Scanner.Index;this.LastMarker.Line=this.Scanner.LineNumber;this.LastMarker.Column=this.Scanner.Index-this.Scanner.LineStart;this.CollectComments();//过滤注释 空格
9856
9856
  if(this.Scanner.Index!==this.StartMarker.Index){this.StartMarker.Index=this.Scanner.Index;this.StartMarker.Line=this.Scanner.LineNumber;this.StartMarker.Column=this.Scanner.Index-this.Scanner.LineStart;}var next=this.Scanner.Lex();this.HasLineTerminator=token.LineNumber!=next.LineNumber;if(next&&this.Context.Strict&&next.Type==3/*Identifier */){//TODO:
9857
9857
  }this.LookAhead=next;return token;};this.CollectComments=function(){this.Scanner.ScanComments();};this.ParseScript=function(){var node=this.CreateNode();var body=this.ParseDirectivePrologues();while(this.LookAhead.Type!=2/*EOF*/){body.push(this.ParseStatementListItem());}return this.Finalize(node,this.Node.Script(body));};//https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive
@@ -9880,7 +9880,7 @@ expr=this.Finalize(this.StartNode(startToken),this.Node.CallExpression(expr,args
9880
9880
  ||token.Type===5;//NullLiteral;
9881
9881
  };this.ParseIdentifierName=function(){var node=this.CreateNode();var token=this.NextToken();if(!this.IsIdentifierName(token)){this.ThrowUnexpectedToken(token);}return this.Finalize(node,this.Node.Identifier(token.Value,token));};this.ParseMemberIdentifierName=function(){var node=this.CreateNode();var token=this.NextToken();if(!this.IsIdentifierName(token)){this.ThrowUnexpectedToken(token);}return this.Finalize(node,this.Node.MemberIdentifier(token.Value,token));};// https://tc39.github.io/ecma262/#sec-left-hand-side-expressions
9882
9882
  this.ParseArguments=function(){this.Expect('(');var args=[];if(!this.Match(')')){while(true){var expr=this.IsolateCoverGrammar(this.ParseAssignmentExpression);args.push(expr);if(this.Match(')'))break;this.ExpectCommaSeparator();if(this.Match(')'))break;}}this.Expect(')');return args;};// Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
9883
- this.ExpectCommaSeparator=function(){this.Expect(',');};// https://tc39.github.io/ecma262/#sec-primary-expression
9883
+ this.ExpectCommaSeparator=function(){this.Expect(',',"函数参数格式错误");};// https://tc39.github.io/ecma262/#sec-primary-expression
9884
9884
  this.ParsePrimaryExpression=function(){var node=this.CreateNode();var expr=void 0;var token,raw;switch(this.LookAhead.Type){case 3:/* Identifier */token=this.NextToken();expr=this.Finalize(node,this.Node.Identifier(token.Value,token));break;case 6:/* NumericLiteral */case 8:/* StringLiteral */this.Context.IsAssignmentTarget=false;this.Context.IsBindingElement=false;token=this.NextToken();raw=this.GetTokenRaw(token);expr=this.Finalize(node,this.Node.Literal(token.Value,raw,token));break;case 7:/* Punctuator */switch(this.LookAhead.Value){case'(':this.Context.IsBindingElement=false;expr=this.InheritCoverGrammar(this.ParseGroupExpression);break;default:expr=this.ThrowUnexpectedToken(this.NextToken());}break;default:expr=this.ThrowUnexpectedToken(this.NextToken());}return expr;};this.ParseGroupExpression=function(){var expr=void 0;this.Expect('(');if(this.Match(')')){this.NextToken();}else{var startToken=this.LookAhead;var params=[];var arrow=false;this.Context.IsBindingElement=true;expr=this.InheritCoverGrammar(this.ParseAssignmentExpression);if(this.Match(',')){var expressions=[];this.Context.IsAssignmentTarget=false;expressions.push(expr);while(this.LookAhead.Type!=2/* EOF */){if(!this.Match(','))break;this.NextToken();if(this.Match(')')){}}}if(!arrow){this.Expect(')');this.Context.IsBindingElement=false;}}return expr;};// https://tc39.github.io/ecma262/#sec-expression-statement
9885
9885
  this.ParseExpressionStatement=function(){var node=this.CreateNode();var expr=this.ParseExpression();this.ConsumeSemicolon();return this.Finalize(node,this.Node.ExpressionStatement(expr));};this.ConsumeSemicolon=function(){if(this.Match(';')){this.NextToken();}else if(!this.HasLineTerminator){//if (this.LookAhead.Type!=2/*EOF*/ && !this.Match('}'))
9886
9886
  this.LastMarker.Index=this.StartMarker.Index;this.LastMarker.Line=this.StartMarker.Line;this.LastMarker.Column=this.StartMarker.Column;}};this.ReinterpretExpressionAsPattern=function(expr){switch(expr.Type){case Syntax.Identifier:case Syntax.MemberExpression:case Syntax.AssignmentExpression:break;default:break;}};this.Finalize=function(marker,node){node.Marker={Line:marker.Line,Column:marker.Column,Index:marker.Index};return node;};this.BinaryPrecedence=function(token){var op=token.Value;var precedence=void 0;if(token.Type===7/* Punctuator */)precedence=this.PeratorPrecedence[op]||0;else precedence=0;return precedence;};this.IsolateCoverGrammar=function(parseFunction){var previousIsBindingElement=this.Context.IsBindingElement;var previousIsAssignmentTarget=this.Context.IsAssignmentTarget;var previousFirstCoverInitializedNameError=this.Context.FirstCoverInitializedNameError;this.Context.IsBindingElement=true;this.Context.IsAssignmentTarget=true;this.Context.FirstCoverInitializedNameError=null;var result=parseFunction.call(this);if(this.Context.FirstCoverInitializedNameError!=null){//错误 this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
@@ -13734,7 +13734,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13734
13734
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
13735
13735
  * 版本信息输出
13736
13736
  *
13737
- */var HQCHART_VERSION="1.1.13688";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13737
+ */var HQCHART_VERSION="1.1.13693";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13738
13738
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13739
13739
  // BaseIndex:BaseIndex,
13740
13740
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13689",
3
+ "version": "1.1.13694",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -49163,10 +49163,13 @@ HQData.RequestIndexVariantData=function(data,callback)
49163
49163
  //测试数据
49164
49164
  var kData=data.Self.Data;
49165
49165
  var hqchartData={ DataType:2, Data:[] };
49166
+ var testValue=0.15;
49166
49167
  for(var i=0;i<kData.Data.length;++i)
49167
49168
  {
49168
49169
  var kItem=kData.Data[i];
49169
- hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*0.15 });
49170
+ hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*testValue });
49171
+ testValue+=0.01;
49172
+ if (testValue>0.23) testValue=0.15;
49170
49173
  }
49171
49174
  callback(hqchartData);
49172
49175
  }
@@ -1605,11 +1605,11 @@ function JSParser(code)
1605
1605
  return this.LookAhead.Type==7 /*Punctuator*/ && this.LookAhead.Value==value;
1606
1606
  }
1607
1607
 
1608
- this.Expect=function(value)
1608
+ this.Expect=function(value, message)
1609
1609
  {
1610
1610
  let token=this.NextToken();
1611
1611
  if (token.Type!=7 /*Punctuator*/ || token.Value!=value)
1612
- this.ThrowUnexpectedToken(token);
1612
+ this.ThrowUnexpectedToken(token, message);
1613
1613
  }
1614
1614
 
1615
1615
  //是否是赋值操作符
@@ -2034,7 +2034,7 @@ function JSParser(code)
2034
2034
  // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
2035
2035
  this.ExpectCommaSeparator=function()
2036
2036
  {
2037
- this.Expect(',');
2037
+ this.Expect(',',"函数参数格式错误");
2038
2038
  }
2039
2039
 
2040
2040
  // https://tc39.github.io/ecma262/#sec-primary-expression
@@ -0,0 +1,219 @@
1
+ //测试流通股
2
+ var TEST_FINANCE_7={
3
+
4
+ "data":
5
+ [
6
+ {
7
+ "Value": 900000000,
8
+ "Date": 19000101
9
+ },
10
+ {
11
+ "Value": 900000000,
12
+ "Date": 20050826
13
+ },
14
+ {
15
+ "Value": 1170000000,
16
+ "Date": 20060509
17
+ },
18
+ {
19
+ "Value": 1170000000,
20
+ "Date": 20060812
21
+ },
22
+ {
23
+ "Value": 1332263340,
24
+ "Date": 20061129
25
+ },
26
+ {
27
+ "Value": 3260608265.0000005,
28
+ "Date": 20070509
29
+ },
30
+ {
31
+ "Value": 3538227622,
32
+ "Date": 20071124
33
+ },
34
+ {
35
+ "Value": 4599695909,
36
+ "Date": 20080418
37
+ },
38
+ {
39
+ "Value": 5012174267,
40
+ "Date": 20080507
41
+ },
42
+ {
43
+ "Value": 5661347506,
44
+ "Date": 20090506
45
+ },
46
+ {
47
+ "Value": 7925886507.999999,
48
+ "Date": 20090603
49
+ },
50
+ {
51
+ "Value": 7925886507.999999,
52
+ "Date": 20090930
53
+ },
54
+ {
55
+ "Value": 7925886507.999999,
56
+ "Date": 20100407
57
+ },
58
+ {
59
+ "Value": 10303652460,
60
+ "Date": 20100604
61
+ },
62
+ {
63
+ "Value": 11479059332,
64
+ "Date": 20100921
65
+ },
66
+ {
67
+ "Value": 11479059332,
68
+ "Date": 20101016
69
+ },
70
+ {
71
+ "Value": 14922777132.000002,
72
+ "Date": 20110530
73
+ },
74
+ {
75
+ "Value": 14922777132.000002,
76
+ "Date": 20141210
77
+ },
78
+ {
79
+ "Value": 14922777132.000002,
80
+ "Date": 20150323
81
+ },
82
+ {
83
+ "Value": 18653471415,
84
+ "Date": 20151010
85
+ },
86
+ {
87
+ "Value": 18653471415,
88
+ "Date": 20160322
89
+ },
90
+ {
91
+ "Value": 20518818557,
92
+ "Date": 20160616
93
+ },
94
+ {
95
+ "Value": 20518818557,
96
+ "Date": 20160811
97
+ },
98
+ {
99
+ "Value": 21618279922.000004,
100
+ "Date": 20170314
101
+ },
102
+ {
103
+ "Value": 28103763899,
104
+ "Date": 20170519
105
+ },
106
+ {
107
+ "Value": 28103763899,
108
+ "Date": 20170906
109
+ },
110
+ {
111
+ "Value": 28103415399.000004,
112
+ "Date": 20180713
113
+ },
114
+ {
115
+ "Value": 28103763899,
116
+ "Date": 20190326
117
+ },
118
+ {
119
+ "Value": 28103794811.999996,
120
+ "Date": 20200703
121
+ },
122
+ {
123
+ "Value": 28103805551,
124
+ "Date": 20200716
125
+ },
126
+ {
127
+ "Value": 28103815214,
128
+ "Date": 20200901
129
+ },
130
+ {
131
+ "Value": 29352131712.000004,
132
+ "Date": 20200901
133
+ },
134
+ {
135
+ "Value": 29352134127.000004,
136
+ "Date": 20201012
137
+ },
138
+ {
139
+ "Value": 29352140893,
140
+ "Date": 20210105
141
+ },
142
+ {
143
+ "Value": 29352144411.999996,
144
+ "Date": 20210402
145
+ },
146
+ {
147
+ "Value": 29352156163,
148
+ "Date": 20210703
149
+ },
150
+ {
151
+ "Value": 29352160584,
152
+ "Date": 20210713
153
+ },
154
+ {
155
+ "Value": 29352165582,
156
+ "Date": 20211009
157
+ },
158
+ {
159
+ "Value": 29352168006.000004,
160
+ "Date": 20220106
161
+ },
162
+ {
163
+ "Value": 29352171861,
164
+ "Date": 20220402
165
+ },
166
+ {
167
+ "Value": 29352172360,
168
+ "Date": 20220702
169
+ },
170
+ {
171
+ "Value": 29352173289,
172
+ "Date": 20220713
173
+ },
174
+ {
175
+ "Value": 29352173656,
176
+ "Date": 20221011
177
+ },
178
+ {
179
+ "Value": 29352174170,
180
+ "Date": 20230105
181
+ },
182
+ {
183
+ "Value": 29352174759,
184
+ "Date": 20230404
185
+ },
186
+ {
187
+ "Value": 29352175421.000004,
188
+ "Date": 20230704
189
+ },
190
+ {
191
+ "Value": 29352175642,
192
+ "Date": 20230713
193
+ },
194
+ {
195
+ "Value": 29352176396,
196
+ "Date": 20231009
197
+ },
198
+ {
199
+ "Value": 29352176396,
200
+ "Date": 20231009
201
+ },
202
+ {
203
+ "Value": 29352176396,
204
+ "Date": 20231009
205
+ },
206
+ {
207
+ "Value": 29352176848,
208
+ "Date": 20240104
209
+ },
210
+ {
211
+ "Value": 29352177224,
212
+ "Date": 20240403
213
+ },
214
+ {
215
+ "Value": 29352177375,
216
+ "Date": 20240702
217
+ }
218
+ ]
219
+ }
@@ -488,10 +488,13 @@ HQData.RequestIndexVariantData=function(data,callback)
488
488
  //测试数据
489
489
  var kData=data.Self.Data;
490
490
  var hqchartData={ DataType:2, Data:[] };
491
+ var testValue=0.15;
491
492
  for(var i=0;i<kData.Data.length;++i)
492
493
  {
493
494
  var kItem=kData.Data[i];
494
- hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*0.15 });
495
+ hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*testValue });
496
+ testValue+=0.01;
497
+ if (testValue>0.23) testValue=0.15;
495
498
  }
496
499
  callback(hqchartData);
497
500
  }
@@ -99580,11 +99580,11 @@ function JSParser(code)
99580
99580
  return this.LookAhead.Type==7 /*Punctuator*/ && this.LookAhead.Value==value;
99581
99581
  }
99582
99582
 
99583
- this.Expect=function(value)
99583
+ this.Expect=function(value, message)
99584
99584
  {
99585
99585
  let token=this.NextToken();
99586
99586
  if (token.Type!=7 /*Punctuator*/ || token.Value!=value)
99587
- this.ThrowUnexpectedToken(token);
99587
+ this.ThrowUnexpectedToken(token, message);
99588
99588
  }
99589
99589
 
99590
99590
  //是否是赋值操作符
@@ -100009,7 +100009,7 @@ function JSParser(code)
100009
100009
  // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
100010
100010
  this.ExpectCommaSeparator=function()
100011
100011
  {
100012
- this.Expect(',');
100012
+ this.Expect(',',"函数参数格式错误");
100013
100013
  }
100014
100014
 
100015
100015
  // https://tc39.github.io/ecma262/#sec-primary-expression
@@ -137750,7 +137750,7 @@ function ScrollBarBGChart()
137750
137750
 
137751
137751
 
137752
137752
 
137753
- var HQCHART_VERSION="1.1.13688";
137753
+ var HQCHART_VERSION="1.1.13693";
137754
137754
 
137755
137755
  function PrintHQChartVersion()
137756
137756
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13688";
8
+ var HQCHART_VERSION="1.1.13693";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -49163,10 +49163,13 @@ HQData.RequestIndexVariantData=function(data,callback)
49163
49163
  //测试数据
49164
49164
  var kData=data.Self.Data;
49165
49165
  var hqchartData={ DataType:2, Data:[] };
49166
+ var testValue=0.15;
49166
49167
  for(var i=0;i<kData.Data.length;++i)
49167
49168
  {
49168
49169
  var kItem=kData.Data[i];
49169
- hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*0.15 });
49170
+ hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol*testValue });
49171
+ testValue+=0.01;
49172
+ if (testValue>0.23) testValue=0.15;
49170
49173
  }
49171
49174
  callback(hqchartData);
49172
49175
  }
@@ -99624,11 +99624,11 @@ function JSParser(code)
99624
99624
  return this.LookAhead.Type==7 /*Punctuator*/ && this.LookAhead.Value==value;
99625
99625
  }
99626
99626
 
99627
- this.Expect=function(value)
99627
+ this.Expect=function(value, message)
99628
99628
  {
99629
99629
  let token=this.NextToken();
99630
99630
  if (token.Type!=7 /*Punctuator*/ || token.Value!=value)
99631
- this.ThrowUnexpectedToken(token);
99631
+ this.ThrowUnexpectedToken(token, message);
99632
99632
  }
99633
99633
 
99634
99634
  //是否是赋值操作符
@@ -100053,7 +100053,7 @@ function JSParser(code)
100053
100053
  // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
100054
100054
  this.ExpectCommaSeparator=function()
100055
100055
  {
100056
- this.Expect(',');
100056
+ this.Expect(',',"函数参数格式错误");
100057
100057
  }
100058
100058
 
100059
100059
  // https://tc39.github.io/ecma262/#sec-primary-expression
@@ -142266,7 +142266,7 @@ function HQChartScriptWorker()
142266
142266
 
142267
142267
 
142268
142268
 
142269
- var HQCHART_VERSION="1.1.13688";
142269
+ var HQCHART_VERSION="1.1.13693";
142270
142270
 
142271
142271
  function PrintHQChartVersion()
142272
142272
  {