hqchart 1.1.14489 → 1.1.14492
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
|
@@ -3288,7 +3288,7 @@ item.FinanceTime=tradeItem.Time;bMatch=true;}}}result[i]=item;++i;}return result
|
|
|
3288
3288
|
this.GetFittingMarketValueData=function(financeData){var result=[];for(var i=0,j=0;i<this.Data.length;){var date=this.Data[i].Date;var price=this.Data[i].Close;if(j+1<financeData.length){if(financeData[j].Date<date&&financeData[j+1].Date<=date){++j;continue;}}var item=new SingleData();item.Date=date;item.Value=financeData[j].Value*price;//市值计算 收盘价*股数
|
|
3289
3289
|
item.FinanceDate=financeData[j].Date;//财务日期 调试用
|
|
3290
3290
|
result[i]=item;++i;}return result;};//月线数据拟合
|
|
3291
|
-
this.GetFittingMonthData=function(overlayData){var result=new Array();var preDate=null;for(var i=0,j=0;i<this.Data.length;){var date=this.Data[i].Date;if(j>=overlayData.length){result[i]=null;++i;continue;;}var overlayDate=overlayData[j].Date;if(overlayDate==date){var item=new SingleData();item.Date=overlayData[j].Date;item.Value=overlayData[j].Value;item.Text=overlayData[j].Text;result[i]=item;++j;++i;}else if(preDate!=null&&preDate<overlayDate&&date>overlayDate){var item=new SingleData();item.Date=date;item.OverlayDate=overlayData[j].Date;item.Value=overlayData[j].Value;item.Text=overlayData[j].Text;result[i]=item;++j;++i;}else if(overlayDate<date){++j;}else{result[i]=new SingleData();result[i].Date=date;++i;}preDate=date;}return result;};this.GetValue=function(){var result=[];for(var i in this.Data){if(this.Data[i]&&this.Data[i].Value!=null){var item=this.Data[i].Value;if(
|
|
3291
|
+
this.GetFittingMonthData=function(overlayData){var result=new Array();var preDate=null;for(var i=0,j=0;i<this.Data.length;){var date=this.Data[i].Date;if(j>=overlayData.length){result[i]=null;++i;continue;;}var overlayDate=overlayData[j].Date;if(overlayDate==date){var item=new SingleData();item.Date=overlayData[j].Date;item.Value=overlayData[j].Value;item.Text=overlayData[j].Text;result[i]=item;++j;++i;}else if(preDate!=null&&preDate<overlayDate&&date>overlayDate){var item=new SingleData();item.Date=date;item.OverlayDate=overlayData[j].Date;item.Value=overlayData[j].Value;item.Text=overlayData[j].Text;result[i]=item;++j;++i;}else if(overlayDate<date){++j;}else{result[i]=new SingleData();result[i].Date=date;++i;}preDate=date;}return result;};this.GetValue=function(){var result=[];for(var i in this.Data){if(this.Data[i]&&this.Data[i].Value!=null){var item=this.Data[i].Value;if(IFrameSplitOperator.IsNumber(item))result[i]=item;else if(IFrameSplitOperator.IsString(item))result[i]=item;else if(item instanceof Array)//支持数组
|
|
3292
3292
|
result[i]=item;else result[i]=null;}else result[i]=null;}return result;};this.GetObject=function(){var result=[];for(var i in this.Data){if(this.Data[i]&&this.Data[i].Value){var item=this.Data[i].Value;result[i]=item;}else result[i]=null;}return result;};this.GetPeriodSingleData=function(period){var result=new Array();var index=0;var startDate=0;var weekCount=2;var newData=null;for(var i in this.Data){var isNewData=false;var dayData=this.Data[i];if(dayData==null||dayData.Date==null)continue;switch(period){case 1://周线
|
|
3293
3293
|
var fridayDate=ChartData.GetFirday(dayData.Date);if(fridayDate!=startDate){isNewData=true;startDate=fridayDate;}break;case 21://双周
|
|
3294
3294
|
var fridayDate=ChartData.GetFirday(dayData.Date);if(fridayDate!=startDate){++weekCount;if(weekCount>=2){isNewData=true;weekCount=0;}startDate=fridayDate;}break;case 2://月线
|
|
@@ -3973,7 +3973,7 @@ else this.Canvas.moveTo(x,y);bFirstPoint=false;ptFirst={X:x,Y:y};}else{if(bHScre
|
|
|
3973
3973
|
{if(bHScreen)this.Canvas.lineTo(ptFirst.Y,ptFirst.X+1*GetDevicePixelRatio());else this.Canvas.lineTo(ptFirst.X+1*GetDevicePixelRatio(),ptFirst.Y);}this.Canvas.stroke();}this.Canvas.restore();};}//标题
|
|
3974
3974
|
function ChartIndexTitle(){this.newMethod=IChartPainting;//派生
|
|
3975
3975
|
this.newMethod();delete this.newMethod;this.ClassName='ChartIndexTitle';//类名
|
|
3976
|
-
this.Draw=function(){};this.GetMaxMin=function(){return
|
|
3976
|
+
this.Draw=function(){};this.GetMaxMin=function(){return{Min:null,Max:null};};}//面积图 支持横屏
|
|
3977
3977
|
function ChartArea(){this.newMethod=IChartPainting;//派生
|
|
3978
3978
|
this.newMethod();delete this.newMethod;this.ClassName='ChartArea';//类名
|
|
3979
3979
|
this.Color="rgb(255,193,37)";//线段颜色
|
|
@@ -14368,7 +14368,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14368
14368
|
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);};}/********************************************************************************
|
|
14369
14369
|
* 版本信息输出
|
|
14370
14370
|
*
|
|
14371
|
-
*/var HQCHART_VERSION="1.1.
|
|
14371
|
+
*/var HQCHART_VERSION="1.1.14491";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();//把给外界调用的方法暴露出来
|
|
14372
14372
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14373
14373
|
// BaseIndex:BaseIndex,
|
|
14374
14374
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -23386,7 +23386,9 @@ function ChartData()
|
|
|
23386
23386
|
if (this.Data[i] && this.Data[i].Value!=null)
|
|
23387
23387
|
{
|
|
23388
23388
|
var item=this.Data[i].Value;
|
|
23389
|
-
if (
|
|
23389
|
+
if (IFrameSplitOperator.IsNumber(item))
|
|
23390
|
+
result[i]=item;
|
|
23391
|
+
else if (IFrameSplitOperator.IsString(item))
|
|
23390
23392
|
result[i]=item;
|
|
23391
23393
|
else if (item instanceof Array) //支持数组
|
|
23392
23394
|
result[i]=item;
|
|
@@ -33420,7 +33422,7 @@ function ChartIndexTitle()
|
|
|
33420
33422
|
|
|
33421
33423
|
this.GetMaxMin=function()
|
|
33422
33424
|
{
|
|
33423
|
-
return
|
|
33425
|
+
return { Min:null, Max:null };
|
|
33424
33426
|
}
|
|
33425
33427
|
}
|
|
33426
33428
|
|
|
@@ -27311,7 +27311,9 @@ function ChartData()
|
|
|
27311
27311
|
if (this.Data[i] && this.Data[i].Value!=null)
|
|
27312
27312
|
{
|
|
27313
27313
|
var item=this.Data[i].Value;
|
|
27314
|
-
if (
|
|
27314
|
+
if (IFrameSplitOperator.IsNumber(item))
|
|
27315
|
+
result[i]=item;
|
|
27316
|
+
else if (IFrameSplitOperator.IsString(item))
|
|
27315
27317
|
result[i]=item;
|
|
27316
27318
|
else if (item instanceof Array) //支持数组
|
|
27317
27319
|
result[i]=item;
|
|
@@ -37345,7 +37347,7 @@ function ChartIndexTitle()
|
|
|
37345
37347
|
|
|
37346
37348
|
this.GetMaxMin=function()
|
|
37347
37349
|
{
|
|
37348
|
-
return
|
|
37350
|
+
return { Min:null, Max:null };
|
|
37349
37351
|
}
|
|
37350
37352
|
}
|
|
37351
37353
|
|
|
@@ -144134,7 +144136,7 @@ function ScrollBarBGChart()
|
|
|
144134
144136
|
|
|
144135
144137
|
|
|
144136
144138
|
|
|
144137
|
-
var HQCHART_VERSION="1.1.
|
|
144139
|
+
var HQCHART_VERSION="1.1.14491";
|
|
144138
144140
|
|
|
144139
144141
|
function PrintHQChartVersion()
|
|
144140
144142
|
{
|
|
@@ -27355,7 +27355,9 @@ function ChartData()
|
|
|
27355
27355
|
if (this.Data[i] && this.Data[i].Value!=null)
|
|
27356
27356
|
{
|
|
27357
27357
|
var item=this.Data[i].Value;
|
|
27358
|
-
if (
|
|
27358
|
+
if (IFrameSplitOperator.IsNumber(item))
|
|
27359
|
+
result[i]=item;
|
|
27360
|
+
else if (IFrameSplitOperator.IsString(item))
|
|
27359
27361
|
result[i]=item;
|
|
27360
27362
|
else if (item instanceof Array) //支持数组
|
|
27361
27363
|
result[i]=item;
|
|
@@ -37389,7 +37391,7 @@ function ChartIndexTitle()
|
|
|
37389
37391
|
|
|
37390
37392
|
this.GetMaxMin=function()
|
|
37391
37393
|
{
|
|
37392
|
-
return
|
|
37394
|
+
return { Min:null, Max:null };
|
|
37393
37395
|
}
|
|
37394
37396
|
}
|
|
37395
37397
|
|
|
@@ -153963,7 +153965,7 @@ function HQChartScriptWorker()
|
|
|
153963
153965
|
|
|
153964
153966
|
|
|
153965
153967
|
|
|
153966
|
-
var HQCHART_VERSION="1.1.
|
|
153968
|
+
var HQCHART_VERSION="1.1.14491";
|
|
153967
153969
|
|
|
153968
153970
|
function PrintHQChartVersion()
|
|
153969
153971
|
{
|