hqchart 1.1.14809 → 1.1.14811
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
|
@@ -9691,7 +9691,7 @@ if(this.IsSHGEM(symbol))return{Max:0.2,Min:-0.2};//创业板 [20% - -20%]
|
|
|
9691
9691
|
if(!name)return null;if(name.indexOf('ST')>=0)return{Max:0.05,Min:-0.05};//ST 股票 [5% - -5%]
|
|
9692
9692
|
return{Max:0.1,Min:-0.1};//[10% - -10%]
|
|
9693
9693
|
},GetDefaultDecimal:function GetDefaultDecimal(symbol)//默认小数位数
|
|
9694
|
-
{return 2;},GetSHDecimal:function GetSHDecimal(symbol){return 2;},GetSZDecimal:function GetSZDecimal(symbol){return 2;},GetFHKDecimal:function GetFHKDecimal(symbol)//港股指数期货 小数位数
|
|
9694
|
+
{return 2;},GetSHDecimal:function GetSHDecimal(symbol){return 2;},GetSZDecimal:function GetSZDecimal(symbol){return 2;},GetSHSZCustomIndexDecimal:function GetSHSZCustomIndexDecimal(symbol){return 3;},GetFHKDecimal:function GetFHKDecimal(symbol)//港股指数期货 小数位数
|
|
9695
9695
|
{return 0;},GetFTSEDecimal:function GetFTSEDecimal(symbol)//富时中国A50期货 小数位数
|
|
9696
9696
|
{return 0;},GetBITDecimal:function GetBITDecimal(symbol){return 2;},GetSHODecimal:function GetSHODecimal(symbol){return 4;},GetETDecimal:function GetETDecimal(symbol){return 2;},GetHKDecimal:function GetHKDecimal(symbol){return 2;},GetTWDecimal:function GetTWDecimal(symbol){return 2;},GetJPDecimal:function GetJPDecimal(symbol){return 2;},GetHSXDecimal:function GetHSXDecimal(symbol){return 2;},GetHNXDecimal:function GetHNXDecimal(symbol){return 2;},GetUPCOMDecimal:function GetUPCOMDecimal(symbol){return 2;},GetForeignExchangeDecimal:function GetForeignExchangeDecimal(symbol){return 4;},GetNYMEXDecimal:function GetNYMEXDecimal(symbol)//纽约期货交易所
|
|
9697
9697
|
{return g_NYMEXTimeData.GetDecimal(symbol);},GetCOMEXDecimal:function GetCOMEXDecimal(symbol){return g_COMEXTimeData.GetDecimal(symbol);},GetNYBOTDecimal:function GetNYBOTDecimal(symbol){return g_NYBOTTimeData.GetDecimal(symbol);},GetCBOTDecimal:function GetCBOTDecimal(symbol){return g_CBOTTimeData.GetDecimal(symbol);},GetLMEDecimal:function GetLMEDecimal(symbol){return g_LMETimeData.GetDecimal(symbol);},GetTOCOMDecimal:function GetTOCOMDecimal(symbol){return g_TOCOMTimeData.GetDecimal(symbol);},GetIPEDecimal:function GetIPEDecimal(symbol){return g_IPETimeData.GetDecimal(symbol);},GetETMarketStatus:function GetETMarketStatus(symbol){// 0=闭市 1=盘前 2=盘中 3=盘后
|
|
@@ -9728,7 +9728,7 @@ this.Initialize=function()//初始化 默认只初始化沪深的 其他市场
|
|
|
9728
9728
|
//this.HK = this.CreateHKData();
|
|
9729
9729
|
};this.GetET=function(upperSymbol)//当天所有的分钟
|
|
9730
9730
|
{throw{Name:'MinuteTimeStringData::GetET',Error:'not implement'};};this.GetSHSZ=function(upperSymbol)//动态创建
|
|
9731
|
-
{if(!this.SHSZ)this.SHSZ=this.CreateSHSZData();return this.SHSZ;};this.GetBJ=function(upperSymbol){if(!this.BJ)this.BJ=this.CreateBJData();return this.BJ;};this.GetSHO=function(upperSymbol){if(!this.SHO)this.SHO=this.CreateSHOData();return this.SHO;};this.GetSZO=function(upperSymbol){if(!this.SZO)this.SZO=this.CreateSZOData();return this.SZO;};this.GetHK=function(upperSymbol){if(!this.HK)this.HK=this.CreateHKData();return this.HK;};this.GetTW=function(upperSymbol){if(this.TW)this.TW=this.CreateTWData();return this.TW;};this.GetJP=function(upperSymbol){if(this.JP)this.JP=this.CreateJPData();return this.JP;};this.GetHSX=function(upperSymbol){if(this.HSX)this.HSX=this.CreateHSXData();return this.HSX;};this.GetHNX=function(upperSymbol){if(this.HNX)this.HSX=this.CreateHNXData();return this.HNX;};this.GetUPCOM=function(upperSymbol){if(this.UPCOM)this.UPCOM=this.CreateUPCOMData();return this.UPCOM;};this.GetFutures=function(splitData){if(!this.Futures.has(splitData.Name)){var data=this.CreateTimeData(splitData.Data);this.Futures.set(splitData.Name,data);}return this.Futures.get(splitData.Name);};// type=时间类型
|
|
9731
|
+
{if(!this.SHSZ)this.SHSZ=this.CreateSHSZData();return this.SHSZ;};this.GetBJ=function(upperSymbol){if(!this.BJ)this.BJ=this.CreateBJData();return this.BJ;};this.GetSHSZCustomIndex=function(upperSymbol){if(!this.SHSZ)this.SHSZ=this.CreateSHSZData();return this.SHSZ;};this.GetSHO=function(upperSymbol){if(!this.SHO)this.SHO=this.CreateSHOData();return this.SHO;};this.GetSZO=function(upperSymbol){if(!this.SZO)this.SZO=this.CreateSZOData();return this.SZO;};this.GetHK=function(upperSymbol){if(!this.HK)this.HK=this.CreateHKData();return this.HK;};this.GetTW=function(upperSymbol){if(this.TW)this.TW=this.CreateTWData();return this.TW;};this.GetJP=function(upperSymbol){if(this.JP)this.JP=this.CreateJPData();return this.JP;};this.GetHSX=function(upperSymbol){if(this.HSX)this.HSX=this.CreateHSXData();return this.HSX;};this.GetHNX=function(upperSymbol){if(this.HNX)this.HSX=this.CreateHNXData();return this.HNX;};this.GetUPCOM=function(upperSymbol){if(this.UPCOM)this.UPCOM=this.CreateUPCOMData();return this.UPCOM;};this.GetFutures=function(splitData){if(!this.Futures.has(splitData.Name)){var data=this.CreateTimeData(splitData.Data);this.Futures.set(splitData.Name,data);}return this.Futures.get(splitData.Name);};// type=时间类型
|
|
9732
9732
|
this.GetUSA=function(upperSymbol){if(!this.USA)this.USA=this.CreateUSAData(0);return this.USA;};this.GetFTSE=function(){if(!this.FTSE)this.FTSE=this.CreateFTSEData();return this.FTSE;};this.GetFHK=function(){if(!this.FHK)this.FHK=this.CreateFHKData();return this.FHK;};this.GetForeignExchange=function(upperSymbol){if(!this.ForeEx)this.ForeEx=this.CreateForeignExchangeData();return this.ForeEx;};this.GetBIT=function(upperSymbol){if(!this.BIT)this.BIT=this.CreateBITData();return this.BIT;};this.CreateSHSZData=function(){var TIME_SPLIT=[{Start:925,End:925},{Start:930,End:1130},{Start:1300,End:1500}];return this.CreateTimeData(TIME_SPLIT);};this.CreateBJData=function(){var TIME_SPLIT=[{Start:925,End:925},{Start:930,End:1130},{Start:1300,End:1500}];return this.CreateTimeData(TIME_SPLIT);};this.CreateSHOData=function(){var TIME_SPLIT=[{Start:930,End:1129},{Start:1300,End:1500}];return this.CreateTimeData(TIME_SPLIT);};this.CreateSZOData=function(){var TIME_SPLIT=[{Start:930,End:1129},{Start:1300,End:1500}];return this.CreateTimeData(TIME_SPLIT);};this.CreateHKData=function(){var TIME_SPLIT=[{Start:930,End:1200},{Start:1300,End:1600}];return this.CreateTimeData(TIME_SPLIT);};this.CreateTWData=function(){var TIME_SPLIT=[{Start:900,End:1330}];return this.CreateTimeData(TIME_SPLIT);};this.CreateJPData=function(){var TIME_SPLIT=[{Start:900,End:1130},{Start:1230,End:1500}];return this.CreateTimeData(TIME_SPLIT);};this.CreateFTSEData=function(){var TIME_SPLIT=[{Start:1700,End:2359},{Start:0,End:445},{Start:900,End:1630}];return this.CreateTimeData(TIME_SPLIT);};this.CreateFHKData=function(){//港股指数期货 9:15-12:00 13:00-16:30 17:15-03:00
|
|
9733
9733
|
var TIME_SPLIT=[{Start:1715,End:2359},{Start:0,End:300},{Start:915,End:1200},{Start:1300,End:1630}];return this.CreateTimeData(TIME_SPLIT);};this.CreateHSXData=function(){throw{Name:'MinuteTimeStringData::CreateHSXData',Error:'not implement'};};this.CreateHNXData=function(){throw{Name:'MinuteTimeStringData::CreateHNXData',Error:'not implement'};};this.CreateUPCOMData=function(){throw{Name:'MinuteTimeStringData::CreateUPCOMData',Error:'not implement'};};this.CreateUSAData=function(type){if(type==1)//美国夏令时
|
|
9734
9734
|
{var TIME_SPLIT=[{Start:2130,End:2359},{Start:0,End:400}];return this.CreateTimeData(TIME_SPLIT);}else if(type==2)//非夏令时
|
|
@@ -9738,7 +9738,7 @@ var TIME_SPLIT=[{Start:1715,End:2359},{Start:0,End:300},{Start:915,End:1200},{St
|
|
|
9738
9738
|
var TIME_SPLIT=[{Start:600,End:2359},{Start:0,End:559}];return this.CreateTimeData(TIME_SPLIT);};this.CreateBITData=function(){//数字货币 7:00 - 6:59
|
|
9739
9739
|
var TIME_SPLIT=[{Start:600,End:2359},{Start:0,End:559}];return this.CreateTimeData(TIME_SPLIT);};this.CreateTimeData=function(timeSplit){var data=[];for(var i in timeSplit){var item=timeSplit[i];for(var j=item.Start;j<=item.End;++j){if(j%100>=60)continue;//大于60分钟的数据去掉
|
|
9740
9740
|
data.push(j);}}return data;};this.GetTimeData=function(symbol){if(!symbol)return this.SHSZ;var upperSymbol=symbol.toLocaleUpperCase();//转成大写
|
|
9741
|
-
if(MARKET_SUFFIX_NAME.IsSHO(upperSymbol))return this.GetSHO();if(MARKET_SUFFIX_NAME.IsSZO(upperSymbol))return this.GetSZO();if(MARKET_SUFFIX_NAME.IsSH(upperSymbol)||MARKET_SUFFIX_NAME.IsSZ(upperSymbol))return this.GetSHSZ(upperSymbol);if(MARKET_SUFFIX_NAME.IsBJ(upperSymbol))return this.GetBJ(upperSymbol);if(MARKET_SUFFIX_NAME.IsHK(upperSymbol))return this.GetHK(upperSymbol);if(MARKET_SUFFIX_NAME.IsTW(upperSymbol))return this.GetTW(upperSymbol);if(MARKET_SUFFIX_NAME.IsJP(upperSymbol))return this.GetJP(upperSymbol);if(MARKET_SUFFIX_NAME.IsUSA(upperSymbol))return this.GetUSA(upperSymbol);if(MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol)||MARKET_SUFFIX_NAME.IsCZCE(upperSymbol)||MARKET_SUFFIX_NAME.IsDCE(upperSymbol)||MARKET_SUFFIX_NAME.IsSHFE(upperSymbol)||MARKET_SUFFIX_NAME.IsGZFE(upperSymbol)){var splitData=g_FuturesTimeData.GetSplitData(upperSymbol);if(!splitData)return null;return this.GetFutures(splitData);}if(MARKET_SUFFIX_NAME.IsFTSE(upperSymbol))return this.GetFTSE();if(MARKET_SUFFIX_NAME.IsFHK(upperSymbol))return this.GetFHK();if(MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol))return this.GetForeignExchange(upperSymbol);if(MARKET_SUFFIX_NAME.IsET(upperSymbol))return this.GetET(upperSymbol);if(MARKET_SUFFIX_NAME.IsBIT(upperSymbol))return this.GetBIT(upperSymbol);//越南股市
|
|
9741
|
+
if(MARKET_SUFFIX_NAME.IsSHO(upperSymbol))return this.GetSHO();if(MARKET_SUFFIX_NAME.IsSZO(upperSymbol))return this.GetSZO();if(MARKET_SUFFIX_NAME.IsSH(upperSymbol)||MARKET_SUFFIX_NAME.IsSZ(upperSymbol))return this.GetSHSZ(upperSymbol);if(MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol))return this.GetSHSZCustomIndex(upperSymbol);if(MARKET_SUFFIX_NAME.IsBJ(upperSymbol))return this.GetBJ(upperSymbol);if(MARKET_SUFFIX_NAME.IsHK(upperSymbol))return this.GetHK(upperSymbol);if(MARKET_SUFFIX_NAME.IsTW(upperSymbol))return this.GetTW(upperSymbol);if(MARKET_SUFFIX_NAME.IsJP(upperSymbol))return this.GetJP(upperSymbol);if(MARKET_SUFFIX_NAME.IsUSA(upperSymbol))return this.GetUSA(upperSymbol);if(MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol)||MARKET_SUFFIX_NAME.IsCZCE(upperSymbol)||MARKET_SUFFIX_NAME.IsDCE(upperSymbol)||MARKET_SUFFIX_NAME.IsSHFE(upperSymbol)||MARKET_SUFFIX_NAME.IsGZFE(upperSymbol)){var splitData=g_FuturesTimeData.GetSplitData(upperSymbol);if(!splitData)return null;return this.GetFutures(splitData);}if(MARKET_SUFFIX_NAME.IsFTSE(upperSymbol))return this.GetFTSE();if(MARKET_SUFFIX_NAME.IsFHK(upperSymbol))return this.GetFHK();if(MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol))return this.GetForeignExchange(upperSymbol);if(MARKET_SUFFIX_NAME.IsET(upperSymbol))return this.GetET(upperSymbol);if(MARKET_SUFFIX_NAME.IsBIT(upperSymbol))return this.GetBIT(upperSymbol);//越南股市
|
|
9742
9742
|
if(MARKET_SUFFIX_NAME.IsHSX(upperSymbol))return this.GetHSX(upperSymbol);if(MARKET_SUFFIX_NAME.IsHNX(upperSymbol))return this.GetHNX(upperSymbol);if(MARKET_SUFFIX_NAME.IsUPCOM(upperSymbol))return this.GetUPCOM(upperSymbol);if(MARKET_SUFFIX_NAME.IsNYMEX(upperSymbol))//纽约期货交易所
|
|
9743
9743
|
{var splitData=g_NYMEXTimeData.GetSplitData(upperSymbol);if(!splitData)return null;return this.GetFutures(splitData);}if(MARKET_SUFFIX_NAME.IsCOMEX(upperSymbol))//纽约期货交易所
|
|
9744
9744
|
{var splitData=g_COMEXTimeData.GetSplitData(upperSymbol);if(!splitData)return null;return this.GetFutures(splitData);}if(MARKET_SUFFIX_NAME.IsNYBOT(upperSymbol))//纽约期货交易所
|
|
@@ -10184,7 +10184,7 @@ this.TIME_SPLIT2=[//ID=0 09:00-07:00
|
|
|
10184
10184
|
if(!symbol)return defaultfloatPrecision;var upperSymbol=symbol.toUpperCase();//全部由外部控制
|
|
10185
10185
|
if(typeof MARKET_SUFFIX_NAME.GetCustomDecimal=='function')return MARKET_SUFFIX_NAME.GetCustomDecimal(upperSymbol);if(MARKET_SUFFIX_NAME.IsSHSZFund(upperSymbol))defaultfloatPrecision=3;//基金3位小数
|
|
10186
10186
|
else if(MARKET_SUFFIX_NAME.IsSHO(upperSymbol)||MARKET_SUFFIX_NAME.IsSZO(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHODecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))defaultfloatPrecision=g_FuturesTimeData.GetDecimal(upperSymbol);//期货小数位数读配置
|
|
10187
|
-
else if(MARKET_SUFFIX_NAME.IsFHK(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetFHKDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsFTSE(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetFTSEDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsBIT(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetBITDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsET(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetETDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetForeignExchangeDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsNYMEX(upperSymbol))defaultfloatPrecision=g_NYMEXTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsCOMEX(upperSymbol))defaultfloatPrecision=g_COMEXTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsNYBOT(upperSymbol))defaultfloatPrecision=g_NYBOTTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsCBOT(upperSymbol))defaultfloatPrecision=g_CBOTTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsLME(upperSymbol))defaultfloatPrecision=g_LMETimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsTOCOM(upperSymbol))defaultfloatPrecision=g_TOCOMTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsIPE(upperSymbol))defaultfloatPrecision=g_IPETimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHK(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHKDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsTW(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetTWDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsJP(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetJPDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHSX(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHSXDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHNX(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHNXDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsUPCOM(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetUPCOMDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsSZ(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSZDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsSH(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHDecimal(upperSymbol);else defaultfloatPrecision=MARKET_SUFFIX_NAME.GetDefaultDecimal(upperSymbol);return defaultfloatPrecision;}//把不连续的分时数据转成连续的分时数据
|
|
10187
|
+
else if(MARKET_SUFFIX_NAME.IsFHK(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetFHKDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsFTSE(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetFTSEDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsBIT(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetBITDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsET(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetETDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetForeignExchangeDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsNYMEX(upperSymbol))defaultfloatPrecision=g_NYMEXTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsCOMEX(upperSymbol))defaultfloatPrecision=g_COMEXTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsNYBOT(upperSymbol))defaultfloatPrecision=g_NYBOTTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsCBOT(upperSymbol))defaultfloatPrecision=g_CBOTTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsLME(upperSymbol))defaultfloatPrecision=g_LMETimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsTOCOM(upperSymbol))defaultfloatPrecision=g_TOCOMTimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsIPE(upperSymbol))defaultfloatPrecision=g_IPETimeData.GetDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHK(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHKDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsTW(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetTWDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsJP(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetJPDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHSX(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHSXDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsHNX(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetHNXDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsUPCOM(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetUPCOMDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsSZ(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSZDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsSH(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHDecimal(upperSymbol);else if(MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol))defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHSZCustomIndexDecimal(upperSymbol);else defaultfloatPrecision=MARKET_SUFFIX_NAME.GetDefaultDecimal(upperSymbol);return defaultfloatPrecision;}//把不连续的分时数据转成连续的分时数据
|
|
10188
10188
|
function GenerateMinuteStockJsonData(data){var stock={symbol:data.symbol,name:data.name,time:data.time,date:data.date,price:data.price,open:data.open,yclose:data.yclose,high:data.high,low:data.low,vol:data.vol,amount:data.amount,minute:[]};var mapMinute=new _map2.default();for(var i in data.minute){var item=data.minute[i];mapMinute.set(item.time,item);}var timeData=g_MinuteTimeStringData.GetTimeData(stock.symbol);for(var i in timeData)//根据交易时间产生数据
|
|
10189
10189
|
{var time=timeData[i];var minuteItem={time:time,vaild:false};if(mapMinute.has(time)){var find=mapMinute.get(time);minuteItem.vaild=true;minuteItem.price=find.price;minuteItem.open=find.open;minuteItem.high=find.high;minuteItem.low=find.low;minuteItem.avprice=find.avprice;minuteItem.vol=find.vol;minuteItem.amount=find.amount;if(IFrameSplitOperator.IsNumber(find.increase))minuteItem.increase=find.increase;if(IFrameSplitOperator.IsNumber(find.risefall))minuteItem.risefall=find.risefall;if(IFrameSplitOperator.IsNumber(find.position))minuteItem.position=find.position;}stock.minute.push(minuteItem);}var vaildCount=0;for(var i=stock.minute.length-1;i>=0;--i){vaildCount=i+1;var item=stock.minute[i];if(item.vaild==true)break;}stock.minute=stock.minute.slice(0,vaildCount);//去掉最后无用的数据
|
|
10190
10190
|
return stock;}function GetLocalTime(i)//得到标准时区的时间的函数
|
|
@@ -15021,7 +15021,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15021
15021
|
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);};}/********************************************************************************
|
|
15022
15022
|
* 版本信息输出
|
|
15023
15023
|
*
|
|
15024
|
-
*/var HQCHART_VERSION="1.1.
|
|
15024
|
+
*/var HQCHART_VERSION="1.1.14810";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();//把给外界调用的方法暴露出来
|
|
15025
15025
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15026
15026
|
// BaseIndex:BaseIndex,
|
|
15027
15027
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -98670,6 +98670,11 @@ var MARKET_SUFFIX_NAME=
|
|
|
98670
98670
|
return 2;
|
|
98671
98671
|
},
|
|
98672
98672
|
|
|
98673
|
+
GetSHSZCustomIndexDecimal:function(symbol)
|
|
98674
|
+
{
|
|
98675
|
+
return 3;
|
|
98676
|
+
},
|
|
98677
|
+
|
|
98673
98678
|
GetFHKDecimal:function(symbol) //港股指数期货 小数位数
|
|
98674
98679
|
{
|
|
98675
98680
|
return 0;
|
|
@@ -98895,6 +98900,12 @@ function MinuteTimeStringData()
|
|
|
98895
98900
|
return this.BJ;
|
|
98896
98901
|
}
|
|
98897
98902
|
|
|
98903
|
+
this.GetSHSZCustomIndex=function(upperSymbol)
|
|
98904
|
+
{
|
|
98905
|
+
if (!this.SHSZ) this.SHSZ=this.CreateSHSZData();
|
|
98906
|
+
return this.SHSZ;
|
|
98907
|
+
}
|
|
98908
|
+
|
|
98898
98909
|
this.GetSHO=function(upperSymbol)
|
|
98899
98910
|
{
|
|
98900
98911
|
if (!this.SHO) this.SHO=this.CreateSHOData();
|
|
@@ -99184,6 +99195,7 @@ function MinuteTimeStringData()
|
|
|
99184
99195
|
if (MARKET_SUFFIX_NAME.IsSHO(upperSymbol)) return this.GetSHO();
|
|
99185
99196
|
if (MARKET_SUFFIX_NAME.IsSZO(upperSymbol)) return this.GetSZO();
|
|
99186
99197
|
if (MARKET_SUFFIX_NAME.IsSH(upperSymbol) || MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) return this.GetSHSZ(upperSymbol);
|
|
99198
|
+
if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) return this.GetSHSZCustomIndex(upperSymbol);
|
|
99187
99199
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return this.GetBJ(upperSymbol);
|
|
99188
99200
|
if (MARKET_SUFFIX_NAME.IsHK(upperSymbol)) return this.GetHK(upperSymbol);
|
|
99189
99201
|
if (MARKET_SUFFIX_NAME.IsTW(upperSymbol)) return this.GetTW(upperSymbol);
|
|
@@ -102062,6 +102074,7 @@ function GetfloatPrecision(symbol) //获取小数位数
|
|
|
102062
102074
|
|
|
102063
102075
|
else if (MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSZDecimal(upperSymbol);
|
|
102064
102076
|
else if (MARKET_SUFFIX_NAME.IsSH(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHDecimal(upperSymbol);
|
|
102077
|
+
else if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHSZCustomIndexDecimal(upperSymbol);
|
|
102065
102078
|
|
|
102066
102079
|
else defaultfloatPrecision=MARKET_SUFFIX_NAME.GetDefaultDecimal(upperSymbol);
|
|
102067
102080
|
|
|
@@ -102766,6 +102766,11 @@ var MARKET_SUFFIX_NAME=
|
|
|
102766
102766
|
return 2;
|
|
102767
102767
|
},
|
|
102768
102768
|
|
|
102769
|
+
GetSHSZCustomIndexDecimal:function(symbol)
|
|
102770
|
+
{
|
|
102771
|
+
return 3;
|
|
102772
|
+
},
|
|
102773
|
+
|
|
102769
102774
|
GetFHKDecimal:function(symbol) //港股指数期货 小数位数
|
|
102770
102775
|
{
|
|
102771
102776
|
return 0;
|
|
@@ -102991,6 +102996,12 @@ function MinuteTimeStringData()
|
|
|
102991
102996
|
return this.BJ;
|
|
102992
102997
|
}
|
|
102993
102998
|
|
|
102999
|
+
this.GetSHSZCustomIndex=function(upperSymbol)
|
|
103000
|
+
{
|
|
103001
|
+
if (!this.SHSZ) this.SHSZ=this.CreateSHSZData();
|
|
103002
|
+
return this.SHSZ;
|
|
103003
|
+
}
|
|
103004
|
+
|
|
102994
103005
|
this.GetSHO=function(upperSymbol)
|
|
102995
103006
|
{
|
|
102996
103007
|
if (!this.SHO) this.SHO=this.CreateSHOData();
|
|
@@ -103280,6 +103291,7 @@ function MinuteTimeStringData()
|
|
|
103280
103291
|
if (MARKET_SUFFIX_NAME.IsSHO(upperSymbol)) return this.GetSHO();
|
|
103281
103292
|
if (MARKET_SUFFIX_NAME.IsSZO(upperSymbol)) return this.GetSZO();
|
|
103282
103293
|
if (MARKET_SUFFIX_NAME.IsSH(upperSymbol) || MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) return this.GetSHSZ(upperSymbol);
|
|
103294
|
+
if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) return this.GetSHSZCustomIndex(upperSymbol);
|
|
103283
103295
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return this.GetBJ(upperSymbol);
|
|
103284
103296
|
if (MARKET_SUFFIX_NAME.IsHK(upperSymbol)) return this.GetHK(upperSymbol);
|
|
103285
103297
|
if (MARKET_SUFFIX_NAME.IsTW(upperSymbol)) return this.GetTW(upperSymbol);
|
|
@@ -106158,6 +106170,7 @@ function GetfloatPrecision(symbol) //获取小数位数
|
|
|
106158
106170
|
|
|
106159
106171
|
else if (MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSZDecimal(upperSymbol);
|
|
106160
106172
|
else if (MARKET_SUFFIX_NAME.IsSH(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHDecimal(upperSymbol);
|
|
106173
|
+
else if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHSZCustomIndexDecimal(upperSymbol);
|
|
106161
106174
|
|
|
106162
106175
|
else defaultfloatPrecision=MARKET_SUFFIX_NAME.GetDefaultDecimal(upperSymbol);
|
|
106163
106176
|
|
|
@@ -149326,7 +149339,7 @@ function ScrollBarBGChart()
|
|
|
149326
149339
|
|
|
149327
149340
|
|
|
149328
149341
|
|
|
149329
|
-
var HQCHART_VERSION="1.1.
|
|
149342
|
+
var HQCHART_VERSION="1.1.14810";
|
|
149330
149343
|
|
|
149331
149344
|
function PrintHQChartVersion()
|
|
149332
149345
|
{
|
|
@@ -102810,6 +102810,11 @@ var MARKET_SUFFIX_NAME=
|
|
|
102810
102810
|
return 2;
|
|
102811
102811
|
},
|
|
102812
102812
|
|
|
102813
|
+
GetSHSZCustomIndexDecimal:function(symbol)
|
|
102814
|
+
{
|
|
102815
|
+
return 3;
|
|
102816
|
+
},
|
|
102817
|
+
|
|
102813
102818
|
GetFHKDecimal:function(symbol) //港股指数期货 小数位数
|
|
102814
102819
|
{
|
|
102815
102820
|
return 0;
|
|
@@ -103035,6 +103040,12 @@ function MinuteTimeStringData()
|
|
|
103035
103040
|
return this.BJ;
|
|
103036
103041
|
}
|
|
103037
103042
|
|
|
103043
|
+
this.GetSHSZCustomIndex=function(upperSymbol)
|
|
103044
|
+
{
|
|
103045
|
+
if (!this.SHSZ) this.SHSZ=this.CreateSHSZData();
|
|
103046
|
+
return this.SHSZ;
|
|
103047
|
+
}
|
|
103048
|
+
|
|
103038
103049
|
this.GetSHO=function(upperSymbol)
|
|
103039
103050
|
{
|
|
103040
103051
|
if (!this.SHO) this.SHO=this.CreateSHOData();
|
|
@@ -103324,6 +103335,7 @@ function MinuteTimeStringData()
|
|
|
103324
103335
|
if (MARKET_SUFFIX_NAME.IsSHO(upperSymbol)) return this.GetSHO();
|
|
103325
103336
|
if (MARKET_SUFFIX_NAME.IsSZO(upperSymbol)) return this.GetSZO();
|
|
103326
103337
|
if (MARKET_SUFFIX_NAME.IsSH(upperSymbol) || MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) return this.GetSHSZ(upperSymbol);
|
|
103338
|
+
if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) return this.GetSHSZCustomIndex(upperSymbol);
|
|
103327
103339
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return this.GetBJ(upperSymbol);
|
|
103328
103340
|
if (MARKET_SUFFIX_NAME.IsHK(upperSymbol)) return this.GetHK(upperSymbol);
|
|
103329
103341
|
if (MARKET_SUFFIX_NAME.IsTW(upperSymbol)) return this.GetTW(upperSymbol);
|
|
@@ -106202,6 +106214,7 @@ function GetfloatPrecision(symbol) //获取小数位数
|
|
|
106202
106214
|
|
|
106203
106215
|
else if (MARKET_SUFFIX_NAME.IsSZ(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSZDecimal(upperSymbol);
|
|
106204
106216
|
else if (MARKET_SUFFIX_NAME.IsSH(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHDecimal(upperSymbol);
|
|
106217
|
+
else if (MARKET_SUFFIX_NAME.IsSHSZCustomIndex(upperSymbol)) defaultfloatPrecision=MARKET_SUFFIX_NAME.GetSHSZCustomIndexDecimal(upperSymbol);
|
|
106205
106218
|
|
|
106206
106219
|
else defaultfloatPrecision=MARKET_SUFFIX_NAME.GetDefaultDecimal(upperSymbol);
|
|
106207
106220
|
|
|
@@ -160320,7 +160333,7 @@ function HQChartScriptWorker()
|
|
|
160320
160333
|
|
|
160321
160334
|
|
|
160322
160335
|
|
|
160323
|
-
var HQCHART_VERSION="1.1.
|
|
160336
|
+
var HQCHART_VERSION="1.1.14810";
|
|
160324
160337
|
|
|
160325
160338
|
function PrintHQChartVersion()
|
|
160326
160339
|
{
|