hqchart 1.1.12845 → 1.1.12851
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
CHANGED
|
@@ -11496,7 +11496,8 @@ this.VisitBinaryExpression=function(node){var stack=[];stack.push(node);var temp
|
|
|
11496
11496
|
switch(value.Operator){case'-':value.Out=this.Algorithm.Subtract(leftValue,rightValue);break;case'*':value.Out=this.Algorithm.Multiply(leftValue,rightValue);break;case'/':value.Out=this.Algorithm.Divide(leftValue,rightValue);break;case'+':value.Out=this.Algorithm.Add(leftValue,rightValue);break;case'>':value.Out=this.Algorithm.GT(leftValue,rightValue);break;case'>=':value.Out=this.Algorithm.GTE(leftValue,rightValue);break;case'<':value.Out=this.Algorithm.LT(leftValue,rightValue);break;case'<=':value.Out=this.Algorithm.LTE(leftValue,rightValue);break;case'==':case'='://= 比较
|
|
11497
11497
|
value.Out=this.Algorithm.EQ(leftValue,rightValue);break;case'!=':case'<>':value.Out=this.Algorithm.NEQ(leftValue,rightValue);break;}if(JS_EXECUTE_DEBUG_LOG)JSConsole.Complier.Log('[JSExecute::VisitBinaryExpression] BinaryExpression',value);}else if(value.Type==Syntax.LogicalExpression){var _leftValue=this.GetNodeValue(value.Left);var _rightValue=this.GetNodeValue(value.Right);if(JS_EXECUTE_DEBUG_LOG)JSConsole.Complier.Log('[JSExecute::VisitBinaryExpression] LogicalExpression',value,_leftValue,_rightValue);value.Out=null;//保存中间值
|
|
11498
11498
|
switch(value.Operator){case'&&':case'AND':value.Out=this.Algorithm.And(_leftValue,_rightValue);break;case'||':case'OR':value.Out=this.Algorithm.Or(_leftValue,_rightValue);break;}if(JS_EXECUTE_DEBUG_LOG)JSConsole.Complier.Log('[JSExecute::VisitBinaryExpression] LogicalExpression',value);}node=temp;}}return node.Out;};this.GetNodeValue=function(node){switch(node.Type){case Syntax.Literal://数字
|
|
11499
|
-
return node.Value;case Syntax.UnaryExpression:if(node.Operator=='-'){var value=this.GetNodeValue(node.Argument);return this.Algorithm.Subtract(0,value);}return node.Argument.Value;case Syntax.Identifier:var value=this.ReadVariable(node.Name,node);return value;case Syntax.BinaryExpression:case Syntax.LogicalExpression:
|
|
11499
|
+
return node.Value;case Syntax.UnaryExpression:if(node.Operator=='-'){var value=this.GetNodeValue(node.Argument);return this.Algorithm.Subtract(0,value);}return node.Argument.Value;case Syntax.Identifier:var value=this.ReadVariable(node.Name,node);return value;case Syntax.BinaryExpression:case Syntax.LogicalExpression:if(node.Out)return node.Out;//如果没有数据需要重新计算
|
|
11500
|
+
JSConsole.Complier.Log('[JSExecute::GetNodeValue] VisitBinaryExpression',node);return this.VisitBinaryExpression(node);case Syntax.CallExpression:return this.VisitCallExpression(node);case Syntax.MemberExpression:return this.ReadMemberVariable(node);default:this.ThrowUnexpectedNode(node);}};this.ThrowUnexpectedNode=function(node,message,word){var marker=node.Marker;var msg=message||"执行异常";return this.ErrorHandler.ThrowError(marker.Index,marker.Line,marker.Column,msg,word);};this.ThrowDownloadSF=function(node,job,message){var marker=node.Marker;var msg=message;return this.ErrorHandler.ThrowDownloadJob(marker.Index,marker.Line,marker.Column,msg,job);};this.ThrowError=function(){};}//脚本说明
|
|
11500
11501
|
function JSExplainer(ast,option){this.AST=ast;this.ErrorHandler=new ErrorHandler();this.ErrorCallback;//执行错误回调
|
|
11501
11502
|
this.UpdateUICallback;this.CallbackParam;this.JobList=[];//执行的任务队列
|
|
11502
11503
|
this.VarTable=new _map2.default();//变量表
|
|
@@ -13029,7 +13030,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13029
13030
|
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);};}/********************************************************************************
|
|
13030
13031
|
* 版本信息输出
|
|
13031
13032
|
*
|
|
13032
|
-
*/var HQCHART_VERSION="1.1.
|
|
13033
|
+
*/var HQCHART_VERSION="1.1.12850";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
13033
13034
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13034
13035
|
// BaseIndex:BaseIndex,
|
|
13035
13036
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -17975,6 +17975,9 @@ function JSExecute(ast,option)
|
|
|
17975
17975
|
return value;
|
|
17976
17976
|
case Syntax.BinaryExpression:
|
|
17977
17977
|
case Syntax.LogicalExpression:
|
|
17978
|
+
if (node.Out) return node.Out;
|
|
17979
|
+
//如果没有数据需要重新计算
|
|
17980
|
+
JSConsole.Complier.Log('[JSExecute::GetNodeValue] VisitBinaryExpression', node);
|
|
17978
17981
|
return this.VisitBinaryExpression(node);
|
|
17979
17982
|
case Syntax.CallExpression:
|
|
17980
17983
|
return this.VisitCallExpression(node);
|
|
@@ -113579,6 +113579,9 @@ function JSExecute(ast,option)
|
|
|
113579
113579
|
return value;
|
|
113580
113580
|
case Syntax.BinaryExpression:
|
|
113581
113581
|
case Syntax.LogicalExpression:
|
|
113582
|
+
if (node.Out) return node.Out;
|
|
113583
|
+
//如果没有数据需要重新计算
|
|
113584
|
+
JSConsole.Complier.Log('[JSExecute::GetNodeValue] VisitBinaryExpression', node);
|
|
113582
113585
|
return this.VisitBinaryExpression(node);
|
|
113583
113586
|
case Syntax.CallExpression:
|
|
113584
113587
|
return this.VisitCallExpression(node);
|
|
@@ -131880,7 +131883,7 @@ function ScrollBarBGChart()
|
|
|
131880
131883
|
|
|
131881
131884
|
|
|
131882
131885
|
|
|
131883
|
-
var HQCHART_VERSION="1.1.
|
|
131886
|
+
var HQCHART_VERSION="1.1.12850";
|
|
131884
131887
|
|
|
131885
131888
|
function PrintHQChartVersion()
|
|
131886
131889
|
{
|
|
@@ -113623,6 +113623,9 @@ function JSExecute(ast,option)
|
|
|
113623
113623
|
return value;
|
|
113624
113624
|
case Syntax.BinaryExpression:
|
|
113625
113625
|
case Syntax.LogicalExpression:
|
|
113626
|
+
if (node.Out) return node.Out;
|
|
113627
|
+
//如果没有数据需要重新计算
|
|
113628
|
+
JSConsole.Complier.Log('[JSExecute::GetNodeValue] VisitBinaryExpression', node);
|
|
113626
113629
|
return this.VisitBinaryExpression(node);
|
|
113627
113630
|
case Syntax.CallExpression:
|
|
113628
113631
|
return this.VisitCallExpression(node);
|
|
@@ -132038,7 +132041,7 @@ function HQChartScriptWorker()
|
|
|
132038
132041
|
|
|
132039
132042
|
|
|
132040
132043
|
|
|
132041
|
-
var HQCHART_VERSION="1.1.
|
|
132044
|
+
var HQCHART_VERSION="1.1.12850";
|
|
132042
132045
|
|
|
132043
132046
|
function PrintHQChartVersion()
|
|
132044
132047
|
{
|