hqchart 1.1.12605 → 1.1.12610
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 +68 -7
- package/package.json +1 -1
- package/src/jscommon/umychart.js +75 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +76 -3
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +86 -10
- package/src/jscommon/umychart.worker.js +10 -7
package/lib/umychart.vue.js
CHANGED
|
@@ -4922,8 +4922,66 @@ if(!pageInfo)return;if(!this.OverlayIndex)return;if(!IFrameSplitOperator.IsNonEm
|
|
|
4922
4922
|
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
4923
4923
|
if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;info.Value=item.Value;var text=IFrameSplitOperator.FormatValueString(item.Value,floatPrecision,this.LanguageID);if(option.Position=='left')info.Message[0]=text;else info.Message[1]=text;if(!pageInfo.IsLast){var config={};if(!pageInfo.IsLast)config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;info.ExtendData={Custom:config};}if(event){var sendData={PreventDefault:false,Label:info,Data:item,IndexName:chart.IndexName,OverlayIdentify:this.OverlayIndex.Identify};event.Callback(event,sendData,this);if(sendData.PreventDefault)continue;}this.Frame.CustomHorizontalInfo.push(info);}}};}//字符串格式化 千分位分割
|
|
4924
4924
|
IFrameSplitOperator.FormatValueThousandsString=function(value,floatPrecision){if(value==null||isNaN(value)){if(floatPrecision>0){var nullText='-.';for(var i=0;i<floatPrecision;++i){nullText+='-';}return nullText;}return'--';}var result='';var num=value.toFixed(floatPrecision);if(floatPrecision>0){var numFloat=num.split('.')[1];var numM=num.split('.')[0];while(numM.length>3){result=','+numM.slice(-3)+result;numM=numM.slice(0,numM.length-3);}if(numM){result=numM+result+'.'+numFloat;}}else{while(num.length>3){result=','+num.slice(-3)+result;num=num.slice(0,num.length-3);}if(num){result=num+result;}}return result;};//数据输出格式化 floatPrecision=小数位数
|
|
4925
|
-
IFrameSplitOperator.FormatValueString=function(value,floatPrecision,languageID){
|
|
4926
|
-
|
|
4925
|
+
IFrameSplitOperator.FormatValueString=function(value,floatPrecision,languageID){/*
|
|
4926
|
+
if (value==null || isNaN(value))
|
|
4927
|
+
{
|
|
4928
|
+
if (floatPrecision>0)
|
|
4929
|
+
{
|
|
4930
|
+
var nullText='-.';
|
|
4931
|
+
for(var i=0;i<floatPrecision;++i)
|
|
4932
|
+
nullText+='-';
|
|
4933
|
+
return nullText;
|
|
4934
|
+
}
|
|
4935
|
+
|
|
4936
|
+
return '--';
|
|
4937
|
+
}
|
|
4938
|
+
|
|
4939
|
+
if (value<0.00000000001 && value>-0.00000000001)
|
|
4940
|
+
{
|
|
4941
|
+
return "0";
|
|
4942
|
+
}
|
|
4943
|
+
|
|
4944
|
+
var absValue = Math.abs(value);
|
|
4945
|
+
if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID)
|
|
4946
|
+
{
|
|
4947
|
+
if (absValue < 10000)
|
|
4948
|
+
return value.toFixed(floatPrecision);
|
|
4949
|
+
else if (absValue < 1000000)
|
|
4950
|
+
return (value/1000).toFixed(floatPrecision)+"K";
|
|
4951
|
+
else if (absValue < 1000000000)
|
|
4952
|
+
return (value/1000000).toFixed(floatPrecision)+"M";
|
|
4953
|
+
else if (absValue < 1000000000000)
|
|
4954
|
+
return (value/1000000000).toFixed(floatPrecision)+"B";
|
|
4955
|
+
else
|
|
4956
|
+
return (value/1000000000000).toFixed(floatPrecision)+"T";
|
|
4957
|
+
}
|
|
4958
|
+
else if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID) //繁体
|
|
4959
|
+
{
|
|
4960
|
+
if (absValue < 10000)
|
|
4961
|
+
return value.toFixed(floatPrecision);
|
|
4962
|
+
else if (absValue < 100000000)
|
|
4963
|
+
return (value/10000).toFixed(floatPrecision)+"萬";
|
|
4964
|
+
else if (absValue < 1000000000000)
|
|
4965
|
+
return (value/100000000).toFixed(floatPrecision)+"億";
|
|
4966
|
+
else
|
|
4967
|
+
return (value/1000000000000).toFixed(floatPrecision)+"萬億";
|
|
4968
|
+
}
|
|
4969
|
+
else
|
|
4970
|
+
{
|
|
4971
|
+
if (absValue < 10000)
|
|
4972
|
+
return value.toFixed(floatPrecision);
|
|
4973
|
+
else if (absValue<1000000)
|
|
4974
|
+
return (value/10000).toFixed(floatPrecision)+"万";
|
|
4975
|
+
else if (absValue < 100000000)
|
|
4976
|
+
return (value/10000).toFixed(floatPrecision)+"万";
|
|
4977
|
+
else if (absValue < 1000000000000)
|
|
4978
|
+
return (value/100000000).toFixed(floatPrecision)+"亿";
|
|
4979
|
+
else
|
|
4980
|
+
return (value/1000000000000).toFixed(floatPrecision)+"万亿";
|
|
4981
|
+
}
|
|
4982
|
+
*/return IFrameSplitOperator.FormatValueStringV2(value,floatPrecision,floatPrecision,languageID);};//数据输出格式化 floatPrecision=原始小数位数 floatPrecision2=转换成'万','亿'..的小数位
|
|
4983
|
+
IFrameSplitOperator.FormatValueStringV2=function(value,floatPrecision,floatPrecision2,languageID){if(value==null||isNaN(value)){if(floatPrecision>0){var nullText='-.';for(var i=0;i<floatPrecision;++i){nullText+='-';}return nullText;}return'--';}if(value<0.00000000001&&value>-0.00000000001){return"0";}var absValue=Math.abs(value);if(languageID===JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID){if(absValue<10000)return value.toFixed(floatPrecision);else if(absValue<1000000)return(value/1000).toFixed(floatPrecision2)+"K";else if(absValue<1000000000)return(value/1000000).toFixed(floatPrecision2)+"M";else if(absValue<1000000000000)return(value/1000000000).toFixed(floatPrecision2)+"B";else return(value/1000000000000).toFixed(floatPrecision2)+"T";}else if(languageID===JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID)//繁体
|
|
4984
|
+
{if(absValue<10000)return value.toFixed(floatPrecision);else if(absValue<100000000)return(value/10000).toFixed(floatPrecision2)+"萬";else if(absValue<1000000000000)return(value/100000000).toFixed(floatPrecision2)+"億";else return(value/1000000000000).toFixed(floatPrecision2)+"萬億";}else{if(absValue<10000)return value.toFixed(floatPrecision);else if(absValue<1000000)return(value/10000).toFixed(floatPrecision2)+"万";else if(absValue<100000000)return(value/10000).toFixed(floatPrecision2)+"万";else if(absValue<1000000000000)return(value/100000000).toFixed(floatPrecision2)+"亿";else return(value/1000000000000).toFixed(floatPrecision2)+"万亿";}return'';};//成交量显示
|
|
4927
4985
|
IFrameSplitOperator.FormatVolString=function(value,languageID){var absValue=Math.abs(value);if(absValue<100000)return value.toFixed(0);else if(absValue<10000000)return(value/10000).toFixed(1)+"万";else if(absValue<100000000)return(value/10000).toFixed(0)+"万";else if(absValue<1000000000)return(value/100000000).toFixed(2)+"亿";else if(absValue<1000000000000)return(value/100000000).toFixed(1)+"亿";else return(value/1000000000000).toFixed(1)+"万亿";};//整形输出格式化 floatPrecision=小数位数
|
|
4928
4986
|
IFrameSplitOperator.FromatIntegerString=function(value,floatPrecision,languageID){if(value<10000&&IFrameSplitOperator.IsInteger(value))floatPrecision=0;//<10000的整形 去掉小数位数
|
|
4929
4987
|
return IFrameSplitOperator.FormatValueString(value,floatPrecision,languageID);};IFrameSplitOperator.NumberToString=function(value){if(value<10)return'0'+value.toString();return value.toString();};//毫秒格式 固定3位, 不足前面自动补0
|
|
@@ -7789,7 +7847,8 @@ item.Frame.YSplitOperator.Symbol=this.Symbol;for(var j in item.OverlayIndex)//
|
|
|
7789
7847
|
this.RecvMinuteDataEvent({FunctionName:"RecvMinuteData"});this.RequestMinuteInfoData();this.RequestOverlayMinuteData();//请求叠加数据 (主数据下载完再下载)
|
|
7790
7848
|
this.CreateChartDrawPictureByStorage();//创建画图工具
|
|
7791
7849
|
this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
7792
|
-
this.Frame.SetSizeChage(true);this.Draw();this.BindAllOverlayIndexData(this.SourceData);
|
|
7850
|
+
this.Frame.SetSizeChage(true);this.Draw();this.BindAllOverlayIndexData(this.SourceData);if(data.AutoUpdate===false)//不执行自动更新
|
|
7851
|
+
{}else{this.AutoUpdateEvent(true,"MinuteChartContainer::RecvMinuteData");this.AutoUpdate();}};this.CaclutateLimitPrice=function(yClose,limitData){this.LimitPrice=null;//var limitData=data.stock[0].limitprice;
|
|
7793
7852
|
if(limitData&&limitData.max>0&&limitData.min>0)//API里带涨停价格 直接使用
|
|
7794
7853
|
{this.LimitPrice={Max:limitData.max,Min:limitData.min};return;}var range=MARKET_SUFFIX_NAME.GetLimitPriceRange(this.Symbol,this.Name);//通过规则获取涨停价格
|
|
7795
7854
|
if(!range){JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' no limit price.');return;}//var yClose=data.stock[0].yclose;
|
|
@@ -12658,12 +12717,14 @@ this.AreaColor=g_JSChartResource.ScrollBar.BGChart.AreaColor;//面积图颜色
|
|
|
12658
12717
|
//
|
|
12659
12718
|
//
|
|
12660
12719
|
//////////////////////////////////////////////////////////////////////////////////
|
|
12661
|
-
function HQChartScriptWorker(){this.
|
|
12662
|
-
|
|
12663
|
-
|
|
12720
|
+
function HQChartScriptWorker(){this.Status=0;//0=空闲 1=运行
|
|
12721
|
+
this.Create=function(){var _this60=this;addEventListener('message',function(obj){_this60.OnRecvMessage(obj);});};this.NetworkFilter=function(data,callback,indexInfo){JSConsole.Complier.Log('[HQChartScriptWorker::NetworkFilter] ['+data.Name+']['+data.Explain+'] data=',data);//数据下载
|
|
12722
|
+
};this.ExecuteScript=function(indexData,message){var _this61=this;var scriptObj={};if(indexData.Script){scriptObj.Name=indexData.Name;scriptObj.ID=indexData.Index;scriptObj.Script=indexData.Script;}else{if(!indexData.Index)return false;var scriptData=new JSIndexScript();var finder=scriptData.Get(indexData.Index);if(!finder)return false;scriptObj.ID=indexData.Index;scriptObj.Name=finder.Name;scriptObj.Script=finder.Script;scriptObj.Args=finder.Args;}if(indexData.Args)scriptObj.Args=indexData.Args;var indexInfo={Name:scriptObj.Name,ID:scriptObj.ID,Script:scriptObj.Script,Args:scriptObj.Args,Guid:message.Guid};scriptObj.ErrorCallback=function(error){_this61.OnExecuteError(error,indexInfo,message);};scriptObj.FinishCallback=function(data,jsExectute){_this61.OnExecuteFinish(data,indexInfo,jsExectute,message);};scriptObj.NetworkFilter=function(data,callback){_this61.NetworkFilter(data,callback,indexInfo,message);};JSConsole.Complier.Log('[HQChartScriptWorker::ExecuteScript] scriptObj=',scriptObj);var indexConsole=new ScriptIndexConsole(scriptObj);var hisData=null;if(message&&message.Data){hisData=new ChartData();hisData.Data=message.Data;hisData.Right=message.Right;hisData.Period=message.Period;hisData.DataType=message.DataType;//0=日线 1=分钟
|
|
12723
|
+
hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,Stock:{Symbol:message.Symbol},Request:{MaxDataCount:500,MaxMinuteDayCount:5},Period:message.Period,Right:message.Right,Data:hisData};if(IFrameSplitOperator.IsNumber(message.HQDataType))stockObj.HQDataType=message.HQDataType;indexConsole.ExecuteScript(stockObj);};this.OnRecvMessage=function(message){var data=message.data;if(!data)return;if(data.ID==JSCHART_WORKER_MESSAGE_ID.EXECUTE_SCRIPT){if(!IFrameSplitOperator.IsNonEmptyArray(data.AryIndex))return;for(var i=0;i<data.AryIndex.length;++i){var item=data.AryIndex[i];this.Status=1;//执行状态
|
|
12724
|
+
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);};}/********************************************************************************
|
|
12664
12725
|
* 版本信息输出
|
|
12665
12726
|
*
|
|
12666
|
-
*/var HQCHART_VERSION="1.1.
|
|
12727
|
+
*/var HQCHART_VERSION="1.1.12609";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();//把给外界调用的方法暴露出来
|
|
12667
12728
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12668
12729
|
// BaseIndex:BaseIndex,
|
|
12669
12730
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -42421,6 +42421,7 @@ IFrameSplitOperator.FormatValueThousandsString=function(value,floatPrecision)
|
|
|
42421
42421
|
//数据输出格式化 floatPrecision=小数位数
|
|
42422
42422
|
IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
42423
42423
|
{
|
|
42424
|
+
/*
|
|
42424
42425
|
if (value==null || isNaN(value))
|
|
42425
42426
|
{
|
|
42426
42427
|
if (floatPrecision>0)
|
|
@@ -42477,6 +42478,71 @@ IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
|
42477
42478
|
else
|
|
42478
42479
|
return (value/1000000000000).toFixed(floatPrecision)+"万亿";
|
|
42479
42480
|
}
|
|
42481
|
+
*/
|
|
42482
|
+
|
|
42483
|
+
|
|
42484
|
+
return IFrameSplitOperator.FormatValueStringV2(value, floatPrecision, floatPrecision, languageID);
|
|
42485
|
+
}
|
|
42486
|
+
|
|
42487
|
+
//数据输出格式化 floatPrecision=原始小数位数 floatPrecision2=转换成'万','亿'..的小数位
|
|
42488
|
+
IFrameSplitOperator.FormatValueStringV2=function(value, floatPrecision, floatPrecision2, languageID)
|
|
42489
|
+
{
|
|
42490
|
+
if (value==null || isNaN(value))
|
|
42491
|
+
{
|
|
42492
|
+
if (floatPrecision>0)
|
|
42493
|
+
{
|
|
42494
|
+
var nullText='-.';
|
|
42495
|
+
for(var i=0;i<floatPrecision;++i)
|
|
42496
|
+
nullText+='-';
|
|
42497
|
+
return nullText;
|
|
42498
|
+
}
|
|
42499
|
+
|
|
42500
|
+
return '--';
|
|
42501
|
+
}
|
|
42502
|
+
|
|
42503
|
+
if (value<0.00000000001 && value>-0.00000000001)
|
|
42504
|
+
{
|
|
42505
|
+
return "0";
|
|
42506
|
+
}
|
|
42507
|
+
|
|
42508
|
+
var absValue = Math.abs(value);
|
|
42509
|
+
if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID)
|
|
42510
|
+
{
|
|
42511
|
+
if (absValue < 10000)
|
|
42512
|
+
return value.toFixed(floatPrecision);
|
|
42513
|
+
else if (absValue < 1000000)
|
|
42514
|
+
return (value/1000).toFixed(floatPrecision2)+"K";
|
|
42515
|
+
else if (absValue < 1000000000)
|
|
42516
|
+
return (value/1000000).toFixed(floatPrecision2)+"M";
|
|
42517
|
+
else if (absValue < 1000000000000)
|
|
42518
|
+
return (value/1000000000).toFixed(floatPrecision2)+"B";
|
|
42519
|
+
else
|
|
42520
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"T";
|
|
42521
|
+
}
|
|
42522
|
+
else if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID) //繁体
|
|
42523
|
+
{
|
|
42524
|
+
if (absValue < 10000)
|
|
42525
|
+
return value.toFixed(floatPrecision);
|
|
42526
|
+
else if (absValue < 100000000)
|
|
42527
|
+
return (value/10000).toFixed(floatPrecision2)+"萬";
|
|
42528
|
+
else if (absValue < 1000000000000)
|
|
42529
|
+
return (value/100000000).toFixed(floatPrecision2)+"億";
|
|
42530
|
+
else
|
|
42531
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"萬億";
|
|
42532
|
+
}
|
|
42533
|
+
else
|
|
42534
|
+
{
|
|
42535
|
+
if (absValue < 10000)
|
|
42536
|
+
return value.toFixed(floatPrecision);
|
|
42537
|
+
else if (absValue<1000000)
|
|
42538
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
42539
|
+
else if (absValue < 100000000)
|
|
42540
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
42541
|
+
else if (absValue < 1000000000000)
|
|
42542
|
+
return (value/100000000).toFixed(floatPrecision2)+"亿";
|
|
42543
|
+
else
|
|
42544
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"万亿";
|
|
42545
|
+
}
|
|
42480
42546
|
|
|
42481
42547
|
return '';
|
|
42482
42548
|
}
|
|
@@ -74940,8 +75006,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
74940
75006
|
|
|
74941
75007
|
this.BindAllOverlayIndexData(this.SourceData);
|
|
74942
75008
|
|
|
74943
|
-
|
|
74944
|
-
|
|
75009
|
+
if (data.AutoUpdate===false) //不执行自动更新
|
|
75010
|
+
{
|
|
75011
|
+
|
|
75012
|
+
}
|
|
75013
|
+
else
|
|
75014
|
+
{
|
|
75015
|
+
this.AutoUpdateEvent(true, "MinuteChartContainer::RecvMinuteData");
|
|
75016
|
+
this.AutoUpdate();
|
|
75017
|
+
}
|
|
74945
75018
|
}
|
|
74946
75019
|
|
|
74947
75020
|
this.CaclutateLimitPrice=function(yClose, limitData)
|
|
@@ -46501,6 +46501,7 @@ IFrameSplitOperator.FormatValueThousandsString=function(value,floatPrecision)
|
|
|
46501
46501
|
//数据输出格式化 floatPrecision=小数位数
|
|
46502
46502
|
IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
46503
46503
|
{
|
|
46504
|
+
/*
|
|
46504
46505
|
if (value==null || isNaN(value))
|
|
46505
46506
|
{
|
|
46506
46507
|
if (floatPrecision>0)
|
|
@@ -46557,6 +46558,71 @@ IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
|
46557
46558
|
else
|
|
46558
46559
|
return (value/1000000000000).toFixed(floatPrecision)+"万亿";
|
|
46559
46560
|
}
|
|
46561
|
+
*/
|
|
46562
|
+
|
|
46563
|
+
|
|
46564
|
+
return IFrameSplitOperator.FormatValueStringV2(value, floatPrecision, floatPrecision, languageID);
|
|
46565
|
+
}
|
|
46566
|
+
|
|
46567
|
+
//数据输出格式化 floatPrecision=原始小数位数 floatPrecision2=转换成'万','亿'..的小数位
|
|
46568
|
+
IFrameSplitOperator.FormatValueStringV2=function(value, floatPrecision, floatPrecision2, languageID)
|
|
46569
|
+
{
|
|
46570
|
+
if (value==null || isNaN(value))
|
|
46571
|
+
{
|
|
46572
|
+
if (floatPrecision>0)
|
|
46573
|
+
{
|
|
46574
|
+
var nullText='-.';
|
|
46575
|
+
for(var i=0;i<floatPrecision;++i)
|
|
46576
|
+
nullText+='-';
|
|
46577
|
+
return nullText;
|
|
46578
|
+
}
|
|
46579
|
+
|
|
46580
|
+
return '--';
|
|
46581
|
+
}
|
|
46582
|
+
|
|
46583
|
+
if (value<0.00000000001 && value>-0.00000000001)
|
|
46584
|
+
{
|
|
46585
|
+
return "0";
|
|
46586
|
+
}
|
|
46587
|
+
|
|
46588
|
+
var absValue = Math.abs(value);
|
|
46589
|
+
if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID)
|
|
46590
|
+
{
|
|
46591
|
+
if (absValue < 10000)
|
|
46592
|
+
return value.toFixed(floatPrecision);
|
|
46593
|
+
else if (absValue < 1000000)
|
|
46594
|
+
return (value/1000).toFixed(floatPrecision2)+"K";
|
|
46595
|
+
else if (absValue < 1000000000)
|
|
46596
|
+
return (value/1000000).toFixed(floatPrecision2)+"M";
|
|
46597
|
+
else if (absValue < 1000000000000)
|
|
46598
|
+
return (value/1000000000).toFixed(floatPrecision2)+"B";
|
|
46599
|
+
else
|
|
46600
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"T";
|
|
46601
|
+
}
|
|
46602
|
+
else if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID) //繁体
|
|
46603
|
+
{
|
|
46604
|
+
if (absValue < 10000)
|
|
46605
|
+
return value.toFixed(floatPrecision);
|
|
46606
|
+
else if (absValue < 100000000)
|
|
46607
|
+
return (value/10000).toFixed(floatPrecision2)+"萬";
|
|
46608
|
+
else if (absValue < 1000000000000)
|
|
46609
|
+
return (value/100000000).toFixed(floatPrecision2)+"億";
|
|
46610
|
+
else
|
|
46611
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"萬億";
|
|
46612
|
+
}
|
|
46613
|
+
else
|
|
46614
|
+
{
|
|
46615
|
+
if (absValue < 10000)
|
|
46616
|
+
return value.toFixed(floatPrecision);
|
|
46617
|
+
else if (absValue<1000000)
|
|
46618
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
46619
|
+
else if (absValue < 100000000)
|
|
46620
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
46621
|
+
else if (absValue < 1000000000000)
|
|
46622
|
+
return (value/100000000).toFixed(floatPrecision2)+"亿";
|
|
46623
|
+
else
|
|
46624
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"万亿";
|
|
46625
|
+
}
|
|
46560
46626
|
|
|
46561
46627
|
return '';
|
|
46562
46628
|
}
|
|
@@ -79020,8 +79086,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
79020
79086
|
|
|
79021
79087
|
this.BindAllOverlayIndexData(this.SourceData);
|
|
79022
79088
|
|
|
79023
|
-
|
|
79024
|
-
|
|
79089
|
+
if (data.AutoUpdate===false) //不执行自动更新
|
|
79090
|
+
{
|
|
79091
|
+
|
|
79092
|
+
}
|
|
79093
|
+
else
|
|
79094
|
+
{
|
|
79095
|
+
this.AutoUpdateEvent(true, "MinuteChartContainer::RecvMinuteData");
|
|
79096
|
+
this.AutoUpdate();
|
|
79097
|
+
}
|
|
79025
79098
|
}
|
|
79026
79099
|
|
|
79027
79100
|
this.CaclutateLimitPrice=function(yClose, limitData)
|
|
@@ -129587,7 +129660,7 @@ function ScrollBarBGChart()
|
|
|
129587
129660
|
|
|
129588
129661
|
|
|
129589
129662
|
|
|
129590
|
-
var HQCHART_VERSION="1.1.
|
|
129663
|
+
var HQCHART_VERSION="1.1.12609";
|
|
129591
129664
|
|
|
129592
129665
|
function PrintHQChartVersion()
|
|
129593
129666
|
{
|
|
@@ -46545,6 +46545,7 @@ IFrameSplitOperator.FormatValueThousandsString=function(value,floatPrecision)
|
|
|
46545
46545
|
//数据输出格式化 floatPrecision=小数位数
|
|
46546
46546
|
IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
46547
46547
|
{
|
|
46548
|
+
/*
|
|
46548
46549
|
if (value==null || isNaN(value))
|
|
46549
46550
|
{
|
|
46550
46551
|
if (floatPrecision>0)
|
|
@@ -46601,6 +46602,71 @@ IFrameSplitOperator.FormatValueString=function(value, floatPrecision,languageID)
|
|
|
46601
46602
|
else
|
|
46602
46603
|
return (value/1000000000000).toFixed(floatPrecision)+"万亿";
|
|
46603
46604
|
}
|
|
46605
|
+
*/
|
|
46606
|
+
|
|
46607
|
+
|
|
46608
|
+
return IFrameSplitOperator.FormatValueStringV2(value, floatPrecision, floatPrecision, languageID);
|
|
46609
|
+
}
|
|
46610
|
+
|
|
46611
|
+
//数据输出格式化 floatPrecision=原始小数位数 floatPrecision2=转换成'万','亿'..的小数位
|
|
46612
|
+
IFrameSplitOperator.FormatValueStringV2=function(value, floatPrecision, floatPrecision2, languageID)
|
|
46613
|
+
{
|
|
46614
|
+
if (value==null || isNaN(value))
|
|
46615
|
+
{
|
|
46616
|
+
if (floatPrecision>0)
|
|
46617
|
+
{
|
|
46618
|
+
var nullText='-.';
|
|
46619
|
+
for(var i=0;i<floatPrecision;++i)
|
|
46620
|
+
nullText+='-';
|
|
46621
|
+
return nullText;
|
|
46622
|
+
}
|
|
46623
|
+
|
|
46624
|
+
return '--';
|
|
46625
|
+
}
|
|
46626
|
+
|
|
46627
|
+
if (value<0.00000000001 && value>-0.00000000001)
|
|
46628
|
+
{
|
|
46629
|
+
return "0";
|
|
46630
|
+
}
|
|
46631
|
+
|
|
46632
|
+
var absValue = Math.abs(value);
|
|
46633
|
+
if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID)
|
|
46634
|
+
{
|
|
46635
|
+
if (absValue < 10000)
|
|
46636
|
+
return value.toFixed(floatPrecision);
|
|
46637
|
+
else if (absValue < 1000000)
|
|
46638
|
+
return (value/1000).toFixed(floatPrecision2)+"K";
|
|
46639
|
+
else if (absValue < 1000000000)
|
|
46640
|
+
return (value/1000000).toFixed(floatPrecision2)+"M";
|
|
46641
|
+
else if (absValue < 1000000000000)
|
|
46642
|
+
return (value/1000000000).toFixed(floatPrecision2)+"B";
|
|
46643
|
+
else
|
|
46644
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"T";
|
|
46645
|
+
}
|
|
46646
|
+
else if (languageID===JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID) //繁体
|
|
46647
|
+
{
|
|
46648
|
+
if (absValue < 10000)
|
|
46649
|
+
return value.toFixed(floatPrecision);
|
|
46650
|
+
else if (absValue < 100000000)
|
|
46651
|
+
return (value/10000).toFixed(floatPrecision2)+"萬";
|
|
46652
|
+
else if (absValue < 1000000000000)
|
|
46653
|
+
return (value/100000000).toFixed(floatPrecision2)+"億";
|
|
46654
|
+
else
|
|
46655
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"萬億";
|
|
46656
|
+
}
|
|
46657
|
+
else
|
|
46658
|
+
{
|
|
46659
|
+
if (absValue < 10000)
|
|
46660
|
+
return value.toFixed(floatPrecision);
|
|
46661
|
+
else if (absValue<1000000)
|
|
46662
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
46663
|
+
else if (absValue < 100000000)
|
|
46664
|
+
return (value/10000).toFixed(floatPrecision2)+"万";
|
|
46665
|
+
else if (absValue < 1000000000000)
|
|
46666
|
+
return (value/100000000).toFixed(floatPrecision2)+"亿";
|
|
46667
|
+
else
|
|
46668
|
+
return (value/1000000000000).toFixed(floatPrecision2)+"万亿";
|
|
46669
|
+
}
|
|
46604
46670
|
|
|
46605
46671
|
return '';
|
|
46606
46672
|
}
|
|
@@ -79064,8 +79130,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
79064
79130
|
|
|
79065
79131
|
this.BindAllOverlayIndexData(this.SourceData);
|
|
79066
79132
|
|
|
79067
|
-
|
|
79068
|
-
|
|
79133
|
+
if (data.AutoUpdate===false) //不执行自动更新
|
|
79134
|
+
{
|
|
79135
|
+
|
|
79136
|
+
}
|
|
79137
|
+
else
|
|
79138
|
+
{
|
|
79139
|
+
this.AutoUpdateEvent(true, "MinuteChartContainer::RecvMinuteData");
|
|
79140
|
+
this.AutoUpdate();
|
|
79141
|
+
}
|
|
79069
79142
|
}
|
|
79070
79143
|
|
|
79071
79144
|
this.CaclutateLimitPrice=function(yClose, limitData)
|
|
@@ -129632,7 +129705,7 @@ function ScrollBarBGChart()
|
|
|
129632
129705
|
|
|
129633
129706
|
function HQChartScriptWorker()
|
|
129634
129707
|
{
|
|
129635
|
-
|
|
129708
|
+
this.Status=0; //0=空闲 1=运行
|
|
129636
129709
|
this.Create=function()
|
|
129637
129710
|
{
|
|
129638
129711
|
addEventListener('message', (obj)=>{ this.OnRecvMessage(obj); });
|
|
@@ -129670,9 +129743,9 @@ function HQChartScriptWorker()
|
|
|
129670
129743
|
if (indexData.Args) scriptObj.Args=indexData.Args;
|
|
129671
129744
|
|
|
129672
129745
|
var indexInfo={ Name:scriptObj.Name, ID:scriptObj.ID, Script:scriptObj.Script, Args:scriptObj.Args, Guid:message.Guid };
|
|
129673
|
-
scriptObj.ErrorCallback=(error)=>{ this.OnExecuteError(error,indexInfo); };
|
|
129674
|
-
scriptObj.FinishCallback=(data, jsExectute)=>{ this.OnExecuteFinish(data, indexInfo, jsExectute); };
|
|
129675
|
-
scriptObj.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback, indexInfo); };
|
|
129746
|
+
scriptObj.ErrorCallback=(error)=>{ this.OnExecuteError(error, indexInfo, message); };
|
|
129747
|
+
scriptObj.FinishCallback=(data, jsExectute)=>{ this.OnExecuteFinish(data, indexInfo, jsExectute, message); };
|
|
129748
|
+
scriptObj.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback, indexInfo, message); };
|
|
129676
129749
|
|
|
129677
129750
|
JSConsole.Complier.Log('[HQChartScriptWorker::ExecuteScript] scriptObj=',scriptObj);
|
|
129678
129751
|
|
|
@@ -129715,18 +129788,21 @@ function HQChartScriptWorker()
|
|
|
129715
129788
|
for(var i=0;i<data.AryIndex.length;++i)
|
|
129716
129789
|
{
|
|
129717
129790
|
var item=data.AryIndex[i];
|
|
129791
|
+
this.Status=1; //执行状态
|
|
129718
129792
|
this.ExecuteScript(item,data);
|
|
129719
129793
|
}
|
|
129794
|
+
|
|
129795
|
+
this.Status=0;
|
|
129720
129796
|
}
|
|
129721
129797
|
}
|
|
129722
129798
|
|
|
129723
|
-
this.OnExecuteFinish=function(data, indexInfo, jsExectute)
|
|
129799
|
+
this.OnExecuteFinish=function(data, indexInfo, jsExectute, jobInfo)
|
|
129724
129800
|
{
|
|
129725
|
-
var message={ Data:data, IndexInfo:indexInfo , ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT };
|
|
129801
|
+
var message={ Data:data, IndexInfo:indexInfo , ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT, JobInfo:jobInfo };
|
|
129726
129802
|
postMessage(message);
|
|
129727
129803
|
}
|
|
129728
129804
|
|
|
129729
|
-
this.OnExecuteError=function(error,indexInfo)
|
|
129805
|
+
this.OnExecuteError=function(error, indexInfo, jobData)
|
|
129730
129806
|
{
|
|
129731
129807
|
var message={ IndexInfo:indexInfo, ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT, Error:error };
|
|
129732
129808
|
postMessage(message);
|
|
@@ -129740,7 +129816,7 @@ function HQChartScriptWorker()
|
|
|
129740
129816
|
|
|
129741
129817
|
|
|
129742
129818
|
|
|
129743
|
-
var HQCHART_VERSION="1.1.
|
|
129819
|
+
var HQCHART_VERSION="1.1.12609";
|
|
129744
129820
|
|
|
129745
129821
|
function PrintHQChartVersion()
|
|
129746
129822
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
function HQChartScriptWorker()
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
this.Status=0; //0=空闲 1=运行
|
|
10
10
|
this.Create=function()
|
|
11
11
|
{
|
|
12
12
|
addEventListener('message', (obj)=>{ this.OnRecvMessage(obj); });
|
|
@@ -44,9 +44,9 @@ function HQChartScriptWorker()
|
|
|
44
44
|
if (indexData.Args) scriptObj.Args=indexData.Args;
|
|
45
45
|
|
|
46
46
|
var indexInfo={ Name:scriptObj.Name, ID:scriptObj.ID, Script:scriptObj.Script, Args:scriptObj.Args, Guid:message.Guid };
|
|
47
|
-
scriptObj.ErrorCallback=(error)=>{ this.OnExecuteError(error,indexInfo); };
|
|
48
|
-
scriptObj.FinishCallback=(data, jsExectute)=>{ this.OnExecuteFinish(data, indexInfo, jsExectute); };
|
|
49
|
-
scriptObj.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback, indexInfo); };
|
|
47
|
+
scriptObj.ErrorCallback=(error)=>{ this.OnExecuteError(error, indexInfo, message); };
|
|
48
|
+
scriptObj.FinishCallback=(data, jsExectute)=>{ this.OnExecuteFinish(data, indexInfo, jsExectute, message); };
|
|
49
|
+
scriptObj.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback, indexInfo, message); };
|
|
50
50
|
|
|
51
51
|
JSConsole.Complier.Log('[HQChartScriptWorker::ExecuteScript] scriptObj=',scriptObj);
|
|
52
52
|
|
|
@@ -89,18 +89,21 @@ function HQChartScriptWorker()
|
|
|
89
89
|
for(var i=0;i<data.AryIndex.length;++i)
|
|
90
90
|
{
|
|
91
91
|
var item=data.AryIndex[i];
|
|
92
|
+
this.Status=1; //执行状态
|
|
92
93
|
this.ExecuteScript(item,data);
|
|
93
94
|
}
|
|
95
|
+
|
|
96
|
+
this.Status=0;
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
this.OnExecuteFinish=function(data, indexInfo, jsExectute)
|
|
100
|
+
this.OnExecuteFinish=function(data, indexInfo, jsExectute, jobInfo)
|
|
98
101
|
{
|
|
99
|
-
var message={ Data:data, IndexInfo:indexInfo , ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT };
|
|
102
|
+
var message={ Data:data, IndexInfo:indexInfo , ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT, JobInfo:jobInfo };
|
|
100
103
|
postMessage(message);
|
|
101
104
|
}
|
|
102
105
|
|
|
103
|
-
this.OnExecuteError=function(error,indexInfo)
|
|
106
|
+
this.OnExecuteError=function(error, indexInfo, jobData)
|
|
104
107
|
{
|
|
105
108
|
var message={ IndexInfo:indexInfo, ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT, Error:error };
|
|
106
109
|
postMessage(message);
|